From e92440a3ba1e88c5fee2fb7f5132edaebabdf391 Mon Sep 17 00:00:00 2001 From: tompng Date: Wed, 25 Oct 2023 19:31:29 +0900 Subject: [PATCH] Fix DialogProcScope width hight calculation --- lib/reline/line_editor.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 8422d4bad3..6dcdda024b 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -571,15 +571,16 @@ def just_cursor_moving end def screen_width - @line_editor.instance_variable_get(:@screen_size).last + @line_editor.screen_width end def screen_height - @line_editor.instance_variable_get(:@screen_size).first + @line_editor.screen_height end def preferred_dialog_height - [cursor_pos.y - @line_editor.screen_scroll_top, @line_editor.rest_height, (screen_height + 6) / 5].max + _editor_cursor_x, editor_cursor_y = @line_editor.editor_cursor_position + [editor_cursor_y - @line_editor.screen_scroll_top, @line_editor.rest_height, (screen_height + 6) / 5].max end def completion_journey_data