ruby-changes:68303
From: aycabta <ko1@a...>
Date: Fri, 8 Oct 2021 10:33:33 +0900 (JST)
Subject: [ruby-changes:68303] a2f55679f0 (master): [ruby/reline] Rename DIALOG_HEIGHT with DIALOG_DEFAULT_HEIGHT
https://git.ruby-lang.org/ruby.git/commit/?id=a2f55679f0 From a2f55679f0baed3ad99321032734f7e81e4137bc Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> 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 https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L622 @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 https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L662 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.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/