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)