From 8f83fe3b02f6689cd1ea85ec59c6fad12066f301 Mon Sep 17 00:00:00 2001 From: aycabta Date: Fri, 31 May 2019 05:53:02 +0900 Subject: Finish with ^D only when input is completely empty in vi insert mode --- lib/reline/line_editor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/reline/line_editor.rb') diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index bc491a9038..a8a3f67474 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1619,7 +1619,7 @@ class Reline::LineEditor end private def vi_list_or_eof(key) - if @line.empty? + if (not @is_multiline and @line.empty?) or (@is_multiline and @line.empty? and @buffer_of_lines.size == 1) @line = nil if @buffer_of_lines.size > 1 scroll_down(@highest_in_all - @first_line_started_from) -- cgit v1.2.3