Skip to content

Commit

Permalink
Fix a misalignment when dialog is shown on top
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Sep 2, 2021
1 parent 44da8a6 commit 0527b1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Expand Up @@ -632,7 +632,7 @@ def add_dialog_proc(name, p, context = nil)
if (lower_space + @rest_height - dialog_render_info.pos.y) >= height
dialog.vertical_offset = dialog_render_info.pos.y + 1
elsif upper_space >= height
dialog.vertical_offset = dialog_render_info.pos.y + -(height + 1)
dialog.vertical_offset = dialog_render_info.pos.y - height
else
if (lower_space + @rest_height - dialog_render_info.pos.y) < height
scroll_down(height + dialog_render_info.pos.y)
Expand Down

0 comments on commit 0527b1a

Please sign in to comment.