From a2f55679f0baed3ad99321032734f7e81e4137bc Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 6 Oct 2021 00:09:03 +0900 Subject: [ruby/reline] Rename DIALOG_HEIGHT with DIALOG_DEFAULT_HEIGHT https://github.com/ruby/reline/commit/996bfec64b --- lib/reline/line_editor.rb | 4 ++-- 1 file 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 -- cgit v1.2.3