aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStan Lo <stan001212@gmail.com>2023-07-12 20:55:15 +0100
committergit <svn-admin@ruby-lang.org>2023-07-12 19:55:19 +0000
commit81beb29988025871c04a225dfdfc0ba9bb1ff19c (patch)
treec38a9464f7095f663a9b351a53bdf6d71ea0a713 /lib
parenta02f5eb56a53e6799e73cfbb96fc8ccd68fa5651 (diff)
downloadruby-81beb29988025871c04a225dfdfc0ba9bb1ff19c.tar.gz
[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
Diffstat (limited to 'lib')
-rw-r--r--lib/irb/input-method.rb2
1 files changed, 1 insertions, 1 deletions
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')