diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 70f00f726f..323f9c28c8 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -831,7 +831,9 @@ def finish next_line = @line.byteslice(@byte_pointer, @line.bytesize - @byte_pointer) cursor_line = @line.byteslice(0, @byte_pointer) insert_new_line(cursor_line, next_line) - @is_confirm_multiline_termination = true + if @line_index == (@buffer_of_lines.size - 1) + @is_confirm_multiline_termination = true + end end return end