From 9b2afb2eed894aa45f7bf2a1ef7793290fe95e9e Mon Sep 17 00:00:00 2001 From: aycabta Date: Mon, 23 Aug 2021 22:02:25 +0900 Subject: [ruby/reline] Scroll properly to create margin https://github.com/ruby/reline/commit/064d54f8f1 --- lib/reline/line_editor.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 0f27237a1a..4dd4e6dca0 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -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 -- cgit v1.2.3