Skip to content

Commit

Permalink
[ruby/irb] Use DialogRenderInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta authored and matzbot committed Aug 30, 2021
1 parent b30be9f commit c63d98b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/irb/input-method.rb
Expand Up @@ -359,7 +359,9 @@ def auto_indent(&block)
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.
Expand Down

0 comments on commit c63d98b

Please sign in to comment.