зеркало из https://github.com/github/ruby.git
Fix strange vertical cursor moving when adding a newline at bottom
This commit is contained in:
Родитель
106843d839
Коммит
fcca39fa73
|
@ -360,8 +360,12 @@ class Reline::LineEditor
|
|||
back = 0
|
||||
modify_lines(new_lines).each_with_index do |line, index|
|
||||
height = render_partial(prompt, prompt_width, line, false)
|
||||
move_cursor_down(1)
|
||||
back += height
|
||||
if index < (new_lines.size - 1)
|
||||
scroll_down(1)
|
||||
back += height
|
||||
else
|
||||
back += height - 1
|
||||
end
|
||||
end
|
||||
move_cursor_up(back)
|
||||
if @previous_line_index
|
||||
|
|
Загрузка…
Ссылка в новой задаче