From 418c2b945e0b6e4a2b3178ea41af5af39d17267a Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Wed, 12 Jul 2023 20:55:15 +0100 Subject: [PATCH] Correct preferred_dialog_height's caller (#638) The caller should be the dialog itself, not Reline. --- 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 2c827f900..cd1f5ef5d 100644 --- a/lib/irb/input-method.rb +++ b/lib/irb/input-method.rb @@ -396,7 +396,7 @@ def auto_indent(&block) 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')