mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix vertical cursor moving when splitting line
This commit is contained in:
parent
34d7ec4e9b
commit
df6a673ca5
1 changed files with 2 additions and 1 deletions
|
@ -281,9 +281,10 @@ class Reline::LineEditor
|
||||||
}
|
}
|
||||||
diff = all_height - @highest_in_all
|
diff = all_height - @highest_in_all
|
||||||
if diff > 0
|
if diff > 0
|
||||||
|
move_cursor_down(@highest_in_all - @first_line_started_from - @started_from - 1)
|
||||||
@highest_in_all = all_height
|
@highest_in_all = all_height
|
||||||
scroll_down(diff)
|
scroll_down(diff)
|
||||||
move_cursor_up(@first_line_started_from + @started_from + diff)
|
move_cursor_up(@highest_in_all - 1)
|
||||||
back = 0
|
back = 0
|
||||||
@buffer_of_lines.each_with_index do |line, index|
|
@buffer_of_lines.each_with_index do |line, index|
|
||||||
line = @line if index == @previous_line_index
|
line = @line if index == @previous_line_index
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue