Skip to content

Commit a188176

Browse files
committed
Shrink the dialog height when contents is shorter than it
1 parent 0527b1a commit a188176

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/reline/line_editor.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,6 +609,7 @@ def add_dialog_proc(name, p, context = nil)
609609
height = dialog_render_info.height || DIALOG_HEIGHT
610610
pointer = dialog_render_info.pointer
611611
dialog.contents = dialog_render_info.contents
612+
height = dialog.contents.size if dialog.contents.size < height
612613
if dialog.contents.size > height
613614
if dialog_render_info.pointer
614615
if dialog_render_info.pointer < 0

0 commit comments

Comments
 (0)