summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-02 16:27:00 +0900
committergit <svn-admin@ruby-lang.org>2021-09-02 17:11:14 +0900
commit4208cd030101c9c174af99e4ef574bbb86b325f1 (patch)
treeb041d2434df7a8c825b263b98ae35fcb9dc64014 /lib
parenta44d28db9f2c8d3fd82314e59b96f2e69aa16283 (diff)
[ruby/reline] Shrink the dialog height when contents is shorter than it
https://github.com/ruby/reline/commit/a18817635f
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/line_editor.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 4f89e3700a..27e96ed458 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -609,6 +609,7 @@ class Reline::LineEditor
height = dialog_render_info.height || DIALOG_HEIGHT
pointer = dialog_render_info.pointer
dialog.contents = dialog_render_info.contents
+ height = dialog.contents.size if dialog.contents.size < height
if dialog.contents.size > height
if dialog_render_info.pointer
if dialog_render_info.pointer < 0