From 81beb29988025871c04a225dfdfc0ba9bb1ff19c Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 12 Jul 2023 20:55:15 +0100 Subject: [PATCH] [ruby/irb] Correct preferred_dialog_height's caller (https://github.com/ruby/irb/pull/638) The caller should be the dialog itself, not Reline. https://github.com/ruby/irb/commit/418c2b945e --- lib/irb/input-method.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb index 300aa1140d..3e7fac2ace 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -397,7 +397,7 @@ module IRB mod_key = RUBY_PLATFORM.match?(/darwin/) ? "Option" : "Alt" message = "Press #{mod_key}+d to read the full document" contents = [message] + doc.accept(formatter).split("\n") - contents = contents.take(Reline.preferred_dialog_height) + contents = contents.take(preferred_dialog_height) y = cursor_pos_to_render.y Reline::DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: contents, width: width, bg_color: '49')