aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-02-02 23:58:20 +0900
committeraycabta <aycabta@gmail.com>2021-02-07 05:11:41 +0900
commit08162f0e6926441d6393d11de45671ab174d88dc (patch)
tree620280970e4e1a7dba75154cacb9d19750eae013 /lib
parentb371ca3f4f304fdc219fe638ff3614b02780c2d3 (diff)
downloadruby-08162f0e6926441d6393d11de45671ab174d88dc.tar.gz
[ruby/reline] Update cursor info by inserting newline even if not in pasting
https://github.com/ruby/reline/commit/92d314f514
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/line_editor.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index 16c41b5c5d..e5c797154f 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -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)