From cf0b9e0db04925fc7bb31366b4dc053beab0bd57 Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Sun, 28 May 2023 00:07:25 +0900 Subject: [ruby/reline] Fix scrolldown condition in dialog rendering (https://github.com/ruby/reline/pull/541) https://github.com/ruby/reline/commit/ad6faada3f --- lib/reline/line_editor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3