1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Use DialogRenderInfo

5bc3a72ca3
This commit is contained in:
aycabta 2021-08-31 04:25:23 +09:00 committed by git
parent b30be9f222
commit c63d98b401

View file

@ -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.