aboutsummaryrefslogtreecommitdiffstats
path: root/lib/reline
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2023-05-28 00:07:25 +0900
committergit <svn-admin@ruby-lang.org>2023-05-27 15:07:29 +0000
commitcf0b9e0db04925fc7bb31366b4dc053beab0bd57 (patch)
tree1839e7911cdb25ade6212810d26835e1f8a5bbf3 /lib/reline
parent5d137a7f77ce1b4ca3514565de41fe8a2cf611a4 (diff)
downloadruby-cf0b9e0db04925fc7bb31366b4dc053beab0bd57.tar.gz
[ruby/reline] Fix scrolldown condition in dialog rendering
(https://github.com/ruby/reline/pull/541) https://github.com/ruby/reline/commit/ad6faada3f
Diffstat (limited to 'lib/reline')
-rw-r--r--lib/reline/line_editor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 2e84ca4d0c..e8b83e2a6e 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -724,7 +724,7 @@ class Reline::LineEditor
ymax = ymax.clamp(screen_y_range.begin, screen_y_range.end)
dialog_y = @first_line_started_from + @started_from
cursor_y = dialog_y
- if @highest_in_all < ymax
+ if @highest_in_all <= ymax
scroll_down(ymax - cursor_y)
move_cursor_up(ymax - cursor_y)
end