1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Finish with ^D only when input is completely empty in vi insert mode

This commit is contained in:
aycabta 2019-05-31 05:53:02 +09:00
parent a4161b7649
commit 8f83fe3b02

View file

@ -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)