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

Exit only when blank input

This commit is contained in:
aycabta 2019-05-28 01:51:01 +09:00
parent b2b5ed1410
commit 69c7ad1723

View file

@ -1242,7 +1242,7 @@ class Reline::LineEditor
end
private def em_delete_or_list(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)