Skip to content

Commit

Permalink
Only when press enter at last line, confirm termination
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta committed Apr 23, 2019
1 parent 6b123f8 commit 7e4260e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e4260e

Please sign in to comment.