summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-05-21 18:45:00 +0900
committeraycabta <aycabta@gmail.com>2019-05-21 18:45:00 +0900
commitbb5b4f9044b583e192d56c7feda4d1084542efd3 (patch)
treed355397b85111e4b09667880c042ff37f2c8cb1a /lib
parentfd95ab44c66ce6b756f66210640cf8e8ffd1bd32 (diff)
Cursor should be at line head after line breaking
Diffstat (limited to 'lib')
-rw-r--r--lib/reline/line_editor.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb
index fb7e377dcf..6c7c5bdd38 100644
--- a/lib/reline/line_editor.rb
+++ b/lib/reline/line_editor.rb
@@ -1037,6 +1037,7 @@ class Reline::LineEditor
next_line = @line.byteslice(@byte_pointer, @line.bytesize - @byte_pointer)
cursor_line = @line.byteslice(0, @byte_pointer)
insert_new_line(cursor_line, next_line)
+ @cursor = 0
if @line_index == (@buffer_of_lines.size - 1)
@is_confirm_multiline_termination = true
end