diff options
author | aycabta <aycabta@gmail.com> | 2019-05-31 05:53:02 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-05-31 05:53:02 +0900 |
commit | 8f83fe3b02f6689cd1ea85ec59c6fad12066f301 (patch) | |
tree | 8bd2ef0254412304eac8d29456a56afe676b8d23 /lib | |
parent | a4161b7649c5aec6ff4d857863e0e829f9d7fde8 (diff) | |
download | ruby-8f83fe3b02f6689cd1ea85ec59c6fad12066f301.tar.gz |
Finish with ^D only when input is completely empty in vi insert mode
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reline/line_editor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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) |