Skip to content

Commit

Permalink
Merge pull request #340 from aycabta/move-only-one-line-when-go-to-ne…
Browse files Browse the repository at this point in the history
…xt-line

Move only one line when render a line and then go to the next line
  • Loading branch information
aycabta committed Sep 7, 2021
2 parents 577df40 + 8a966cd commit 7e3eb64
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ def just_move_cursor
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
Expand Down
1 change: 0 additions & 1 deletion test/reline/yamatanooroti/test_rendering.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ def test_clear
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
Expand Down

0 comments on commit 7e3eb64

Please sign in to comment.