Skip to content

Commit 773bb29

Browse files
authored
Merge pull request #670 from nobu/feature/VT100
Use VT100 sequence to erase previos line
2 parents dc00859 + 3754646 commit 773bb29

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)