diff options
| author | aycabta <aycabta@gmail.com> | 2019-05-26 01:32:12 +0900 |
|---|---|---|
| committer | aycabta <aycabta@gmail.com> | 2019-05-26 01:32:29 +0900 |
| commit | ec759011201ce16db7079dbc26ae9c085c2608ba (patch) | |
| tree | 78ab53cfad004a4bc49d2e68c6266fbbbfbd0d44 | |
| parent | 2993b361333147f6dfb86a153971c22329ffbaf4 (diff) | |
Fix completion menu state calculation
| -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? |
