aboutsummaryrefslogtreecommitdiffstats
path: root/lib/irb/input-method.rb
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-08-31 04:25:23 +0900
committergit <svn-admin@ruby-lang.org>2021-08-31 05:24:55 +0900
commitc63d98b40135a6e4605d35a0fb014c2f3143e38f (patch)
tree89d245e1778f29e8ae20039cd24cda80810609aa /lib/irb/input-method.rb
parentb30be9f22231883b3cb32dac915d967c0fc9220f (diff)
downloadruby-c63d98b40135a6e4605d35a0fb014c2f3143e38f.tar.gz
[ruby/irb] Use DialogRenderInfo
https://github.com/ruby/irb/commit/5bc3a72ca3
Diffstat (limited to 'lib/irb/input-method.rb')
-rw-r--r--lib/irb/input-method.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/irb/input-method.rb b/lib/irb/input-method.rb
index b28dede706..911416a590 100644
--- a/lib/irb/input-method.rb
+++ b/lib/irb/input-method.rb
@@ -359,7 +359,9 @@ module IRB
formatter.width = 40
str = doc.accept(formatter)
- [Reline::CursorPos.new(cursor_pos_to_render.x + 40, cursor_pos_to_render.y + pointer), str.split("\n"), nil, '49']
+ x = cursor_pos_to_render.x + 40
+ y = cursor_pos_to_render.y + pointer - dialog.scroll_top
+ DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: str.split("\n"), bg_color: '49')
}
# Reads the next line from this input method.