Skip to content

Commit 92d314f

Browse files
committed
Update cursor info by inserting newline even if not in pasting
1 parent a921e61 commit 92d314f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/reline/line_editor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,8 @@ def rerender
478478
@line = @buffer_of_lines[@line_index]
479479
unless @in_pasting
480480
render_partial(prompt, prompt_width, @line, @first_line_started_from + @started_from + 1, with_control: false)
481-
@cursor = @cursor_max = calculate_width(@line)
482481
end
482+
@cursor = @cursor_max = calculate_width(@line)
483483
@byte_pointer = @line.bytesize
484484
@highest_in_all += @highest_in_this
485485
@highest_in_this = calculate_height_by_width(prompt_width + @cursor_max)

0 commit comments

Comments
 (0)