Skip to content

Commit 51b791e

Browse files
committed
widget.repaint does not overuse the scroll buffer
The `CSI 2 J` sequence stores screen contents in the scroll buffer in modern terminals. In this case, this is unnecessary operation.
1 parent eb68d85 commit 51b791e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ruby_installer/runtime/console_ui.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def repaint(width: @con.winsize[1], height: @con.winsize[0])
161161
line += "\n"
162162
slines << []
163163
end
164-
@con.write "\e[1;1H" "\e[2J"
164+
@con.write "\e[H" "\e[J"
165165
print "#{headline}"
166166
print @con.cursor.last == 0 ? line.chomp : "\n#{line.chomp}"
167167
@slines = slines

0 commit comments

Comments
 (0)