Skip to content

Commit

Permalink
Fix DialogProcScope width hight calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Oct 31, 2023
1 parent f46f39e commit e92440a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e92440a

Please sign in to comment.