1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Scroll properly to create margin

https://github.com/ruby/reline/commit/064d54f8f1
This commit is contained in:
aycabta 2021-08-23 22:02:25 +09:00
parent 85dd0ad5e0
commit 9b2afb2eed

View file

@ -559,9 +559,8 @@ class Reline::LineEditor
@dialog_vertical_offset = -(DIALOG_HEIGHT + 1)
else
if (lower_space + @rest_height) < DIALOG_HEIGHT
down = DIALOG_HEIGHT - (lower_space + @rest_height)
scroll_down(down)
move_cursor_up(DIALOG_HEIGHT - 1)
scroll_down(DIALOG_HEIGHT)
move_cursor_up(DIALOG_HEIGHT)
end
@dialog_updown = :down
@dialog_vertical_offset = 1