ruby-changes:67653
From: aycabta <ko1@a...>
Date: Wed, 8 Sep 2021 01:11:22 +0900 (JST)
Subject: [ruby-changes:67653] 95089ddaf4 (master): [ruby/reline] Move only one line when render a line and then go to the next line
https://git.ruby-lang.org/ruby.git/commit/?id=95089ddaf4 From 95089ddaf486e6ab245aa479ef1d6da30412a8f6 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> 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 fab0134..21c031d 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1220,7 +1220,7 @@ class Reline::LineEditor https://github.com/ruby/ruby/blob/trunk/lib/reline/line_editor.rb#L1220 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 7a73f07..e93aa1a 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -290,7 +290,6 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L290 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.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/