diff options
| author | aycabta <aycabta@gmail.com> | 2021-08-23 22:02:25 +0900 |
|---|---|---|
| committer | aycabta <aycabta@gmail.com> | 2021-08-29 20:30:33 +0900 |
| commit | 9b2afb2eed894aa45f7bf2a1ef7793290fe95e9e (patch) | |
| tree | 1bbd503266ac953c1ddc3cf1fc7d007554ae9169 | |
| parent | 85dd0ad5e00332f03835640ac01056d54d011468 (diff) | |
[ruby/reline] Scroll properly to create margin
https://github.com/ruby/reline/commit/064d54f8f1
| -rw-r--r-- | lib/reline/line_editor.rb | 5 |
1 files 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 |
