diff options
-rw-r--r-- | lib/reline/line_editor.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index b069a0d912..af634da650 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -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? |