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

The behavior of vi_end_of_transmission should be the same of vi_list_or_eof

This commit is contained in:
aycabta 2019-12-25 09:52:25 +09:00
parent 03c504ac59
commit ed5b4bae6a

View file

@ -1916,18 +1916,6 @@ class Reline::LineEditor
private def vi_yank(key)
end
private def vi_end_of_transmission(key)
if @line.empty?
@line = nil
if @buffer_of_lines.size > 1
scroll_down(@highest_in_all - @first_line_started_from)
end
Reline::IOGate.move_cursor_column(0)
@eof = true
finish
end
end
private def vi_list_or_eof(key)
if (not @is_multiline and @line.empty?) or (@is_multiline and @line.empty? and @buffer_of_lines.size == 1)
@line = nil