summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-10-06 00:09:03 +0900
committergit <svn-admin@ruby-lang.org>2021-10-08 10:33:17 +0900
commita2f55679f0baed3ad99321032734f7e81e4137bc (patch)
tree86783f8afbf37ec37ac54047c969fcc6ab6989ef
parent217df51f0e5d9824ed712a4d175f555d932e44d8 (diff)
[ruby/reline] Rename DIALOG_HEIGHT with DIALOG_DEFAULT_HEIGHT
https://github.com/ruby/reline/commit/996bfec64b
-rw-r--r--lib/reline/line_editor.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 106bb01214..b5bf0d1530 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -622,7 +622,7 @@ class Reline::LineEditor
@dialogs << Dialog.new(name, @config, DialogProcScope.new(self, @config, p, context))
end
- DIALOG_HEIGHT = 20
+ DIALOG_DEFAULT_HEIGHT = 20
private def render_dialog(cursor_column)
@dialogs.each do |dialog|
render_each_dialog(dialog, cursor_column)
@@ -662,7 +662,7 @@ class Reline::LineEditor
else
dialog.width = dialog.contents.map { |l| calculate_width(l, true) }.max
end
- height = dialog_render_info.height || DIALOG_HEIGHT
+ height = dialog_render_info.height || DIALOG_DEFAULT_HEIGHT
height = dialog.contents.size if dialog.contents.size < height
if dialog.contents.size > height
if dialog.pointer