diff options
author | aycabta <aycabta@gmail.com> | 2021-09-08 00:13:23 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-08 00:13:21 +0900 |
commit | 6faf653ab0cd966f738b8e1d41e92f816a360959 (patch) | |
tree | f9f55eebfa6d0660da56c51237027347e99a37af /lib/reline/line_editor.rb | |
parent | 5a01da7a291b4c1f1d231be399712f8fb9f22bc1 (diff) | |
download | ruby-6faf653ab0cd966f738b8e1d41e92f816a360959.tar.gz |
[ruby/reline] The #reset_dialog should also use calculated block elem width
https://github.com/ruby/reline/commit/577df401b9
Diffstat (limited to 'lib/reline/line_editor.rb')
-rw-r--r-- | lib/reline/line_editor.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 6de1347f0b..fab0134419 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -810,8 +810,8 @@ class Reline::LineEditor end move_cursor_up(old_dialog.vertical_offset + line_num - 1 - y_diff) end - old_dialog_scrollbar = old_dialog.scrollbar_pos.nil? ? 0 : calculate_width('█') - dialog_scrollbar = dialog.scrollbar_pos.nil? ? 0 : calculate_width('█') + old_dialog_scrollbar = old_dialog.scrollbar_pos.nil? ? 0 : @block_elem_width + dialog_scrollbar = dialog.scrollbar_pos.nil? ? 0 : @block_elem_width if (old_dialog.column + old_dialog.width - old_dialog_scrollbar) > (dialog.column + dialog.width - dialog_scrollbar) # rerender right move_cursor_down(old_dialog.vertical_offset + y_diff) |