mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Use padding_space_with_escape_sequences to padding spaces in reset_dialog
https://github.com/ruby/reline/commit/7d582f4982
This commit is contained in:
parent
acf11b94d2
commit
f9bdb17c02
1 changed files with 8 additions and 4 deletions
|
@ -700,8 +700,9 @@ class Reline::LineEditor
|
|||
s = ' ' * dialog.width
|
||||
else
|
||||
s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column, dialog.width)
|
||||
s = padding_space_with_escape_sequences(s, dialog.width)
|
||||
end
|
||||
@output.write "\e[39m\e[49m%-#{dialog.width}s\e[39m\e[49m" % s
|
||||
@output.write "\e[39m\e[49m#{s}\e[39m\e[49m"
|
||||
move_cursor_down(1) if i < (line_num - 1)
|
||||
end
|
||||
move_cursor_up(old_dialog.vertical_offset + line_num - 1 - y_diff)
|
||||
|
@ -717,8 +718,9 @@ class Reline::LineEditor
|
|||
s = ' ' * dialog.width
|
||||
else
|
||||
s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column, dialog.width)
|
||||
s = padding_space_with_escape_sequences(s, dialog.width)
|
||||
end
|
||||
@output.write "\e[39m\e[49m%-#{dialog.width}s\e[39m\e[49m" % s
|
||||
@output.write "\e[39m\e[49m#{s}\e[39m\e[49m"
|
||||
move_cursor_down(1) if i < (line_num - 1)
|
||||
end
|
||||
move_cursor_up(dialog.vertical_offset + dialog.contents.size + line_num - 1 - y_diff)
|
||||
|
@ -735,8 +737,9 @@ class Reline::LineEditor
|
|||
s = ' ' * width
|
||||
else
|
||||
s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column, width)
|
||||
s = padding_space_with_escape_sequences(s, dialog.width)
|
||||
end
|
||||
@output.write "\e[39m\e[49m%-#{width}s\e[39m\e[49m" % s
|
||||
@output.write "\e[39m\e[49m#{s}\e[39m\e[49m"
|
||||
move_cursor_down(1) if i < (line_num - 1)
|
||||
end
|
||||
move_cursor_up(old_dialog.vertical_offset + line_num - 1 - y_diff)
|
||||
|
@ -753,9 +756,10 @@ class Reline::LineEditor
|
|||
s = ' ' * width
|
||||
else
|
||||
s = Reline::Unicode.take_range(visual_lines[start + i], old_dialog.column + dialog.width, width)
|
||||
s = padding_space_with_escape_sequences(s, dialog.width)
|
||||
end
|
||||
Reline::IOGate.move_cursor_column(dialog.column + dialog.width)
|
||||
@output.write "\e[39m\e[49m%-#{width}s\e[39m\e[49m" % s
|
||||
@output.write "\e[39m\e[49m#{s}\e[39m\e[49m"
|
||||
move_cursor_down(1) if i < (line_num - 1)
|
||||
end
|
||||
move_cursor_up(old_dialog.vertical_offset + line_num - 1 + y_diff)
|
||||
|
|
Loading…
Add table
Reference in a new issue