Skip to content

Commit

Permalink
Update cursor info by inserting newline even if not in pasting
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Feb 2, 2021
1 parent a921e61 commit 92d314f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ def rerender
@line = @buffer_of_lines[@line_index]
unless @in_pasting
render_partial(prompt, prompt_width, @line, @first_line_started_from + @started_from + 1, with_control: false)
@cursor = @cursor_max = calculate_width(@line)
end
@cursor = @cursor_max = calculate_width(@line)
@byte_pointer = @line.bytesize
@highest_in_all += @highest_in_this
@highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)
Expand Down

0 comments on commit 92d314f

Please sign in to comment.