Skip to content

Commit

Permalink
Remove useless cursor reset in em_delete/vi_list_or_eof action
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Nov 30, 2023
1 parent 9e7ae78 commit 69a3bce
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2013,10 +2013,6 @@ def finish

private def em_delete(key)
if current_line.empty? and (not @is_multiline or @buffer_of_lines.size == 1) and key == "\C-d".ord
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
elsif @byte_pointer < current_line.bytesize
Expand Down Expand Up @@ -2349,10 +2345,6 @@ def finish
private def vi_list_or_eof(key)
if (not @is_multiline and current_line.empty?) or (@is_multiline and current_line.empty? and @buffer_of_lines.size == 1)
set_current_line('', 0)
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
else
Expand Down

0 comments on commit 69a3bce

Please sign in to comment.