diff options
author | aycabta <aycabta@gmail.com> | 2021-09-02 16:15:48 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-02 17:11:09 +0900 |
commit | a44d28db9f2c8d3fd82314e59b96f2e69aa16283 (patch) | |
tree | 88d5f52a6e7c65d5fed241524de3a60df39b910d /lib | |
parent | 123fcc8c921c6f987383429246d31934cd823661 (diff) |
[ruby/reline] Fix a misalignment when dialog is shown on top
https://github.com/ruby/reline/commit/0527b1a492
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 70b118373f..4f89e3700a 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -632,7 +632,7 @@ class Reline::LineEditor if (lower_space + @rest_height - dialog_render_info.pos.y) >= height dialog.vertical_offset = dialog_render_info.pos.y + 1 elsif upper_space >= height - dialog.vertical_offset = dialog_render_info.pos.y + -(height + 1) + dialog.vertical_offset = dialog_render_info.pos.y - height else if (lower_space + @rest_height - dialog_render_info.pos.y) < height scroll_down(height + dialog_render_info.pos.y) |