Skip to content

Commit

Permalink
Correct preferred_dialog_height's caller (#638)
Browse files Browse the repository at this point in the history
The caller should be the dialog itself, not Reline.
  • Loading branch information
st0012 authored Jul 12, 2023
1 parent 85d6b4d commit 418c2b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/input-method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 418c2b9

Please sign in to comment.