Skip to content

Commit 6119215

Browse files
committed
Use VT100 sequence to erase previos line
1 parent 355c4e4 commit 6119215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/stats/normal.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def print_file files_so_far, filename
4242
if $stdout.tty?
4343
# Clean the line with whitespaces so that leftover output from the
4444
# previous line doesn't show up.
45-
$stdout.print("\r" + (" " * @last_width) + ("\b" * @last_width) + "\r") if @last_width && @last_width > 0
45+
$stdout.print("\r\e[K") if @last_width && @last_width > 0
4646
@last_width = line.size
4747
$stdout.print("#{line}\r")
4848
else

0 commit comments

Comments
 (0)