1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Update cursor info by inserting newline even if not in pasting

92d314f514
This commit is contained in:
aycabta 2021-02-02 23:58:20 +09:00
parent b371ca3f4f
commit 08162f0e69

View file

@ -491,8 +491,8 @@ class Reline::LineEditor
@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)