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

Fix completion menu state calculation

This commit is contained in:
aycabta 2019-05-26 01:32:12 +09:00
parent 2993b36133
commit ec75901120

View file

@ -257,10 +257,15 @@ class Reline::LineEditor
def rerender # TODO: support physical and logical lines
if @menu_info
@output.puts
scroll_down(@highest_in_all - @first_line_started_from)
@rerender_all = true
@menu_info.list.each do |item|
@output.puts item
Reline::IOGate.move_cursor_column(0)
@output.print item
scroll_down(1)
end
scroll_down(@highest_in_all - 1)
move_cursor_up(@highest_in_all - 1 - @first_line_started_from)
@menu_info = nil
end
return if @line.nil?