mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/irb] Render properly if both autocomplete and show doc dialogs are left of the cursor
https://github.com/ruby/irb/commit/0090203107
This commit is contained in:
parent
03e9887d2e
commit
f7d9dd2e4c
1 changed files with 2 additions and 1 deletions
|
@ -374,7 +374,8 @@ module IRB
|
|||
contents = [message] + doc.accept(formatter).split("\n")
|
||||
|
||||
x = cursor_pos_to_render.x + autocomplete_dialog.width
|
||||
x = cursor_pos_to_render.x - width if x + width >= screen_width
|
||||
#x = cursor_pos_to_render.x - width if x + width >= screen_width
|
||||
x = autocomplete_dialog.column - width if x + width >= screen_width
|
||||
y = cursor_pos_to_render.y + pointer - autocomplete_dialog.scroll_top
|
||||
DialogRenderInfo.new(pos: Reline::CursorPos.new(x, y), contents: contents, width: width, bg_color: '49')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue