From 95089ddaf486e6ab245aa479ef1d6da30412a8f6 Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 8 Sep 2021 00:40:33 +0900 Subject: [ruby/reline] Move only one line when render a line and then go to the next line https://github.com/ruby/reline/commit/8a966cd962 --- lib/reline/line_editor.rb | 2 +- test/reline/yamatanooroti/test_rendering.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index fab0134419..21c031d57a 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1220,7 +1220,7 @@ class Reline::LineEditor height = render_partial(prompt, prompt_width, line, back, with_control: false) end if index < (@buffer_of_lines.size - 1) - move_cursor_down(height) + move_cursor_down(1) back += height end end diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index 7a73f07d5d..e93aa1a47d 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -290,7 +290,6 @@ begin end def test_clear_multiline_and_autowrap - omit # FIXME clear logic is buggy start_terminal(10, 15, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.') write("def aaaaaa\n 3\n\C-lend") close -- cgit v1.2.3