diff options
author | aycabta <[email protected]> | 2020-12-06 17:45:05 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2020-12-08 00:08:41 +0900 |
commit | 3bf7b999e503199e2e9fe68ade25ee6830b3e57e (patch) | |
tree | ba4fc352f13290f31b012e4ed73c000949f59b72 /lib | |
parent | b5ef4ad3120eabd0a6107524ca9503c19afdc8a5 (diff) |
[ruby/reline] Editing to initial content is not just cursor moving
https://github.com/ruby/reline/commit/0a4f175b0a
Diffstat (limited to 'lib')
-rw-r--r-- | lib/reline/line_editor.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index f8be32e913..236993ffb0 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -933,6 +933,7 @@ class Reline::LineEditor finish return end + old_line = @line.dup @first_char = false completion_occurs = false if @config.editing_mode_is?(:emacs, :vi_insert) and key.char == "\C-i".ord @@ -964,7 +965,7 @@ class Reline::LineEditor if not Reline::IOGate.in_pasting? and @just_cursor_moving.nil? if @previous_line_index and @buffer_of_lines[@previous_line_index] == @line @just_cursor_moving = true - elsif @previous_line_index.nil? and @buffer_of_lines[@line_index] == @line + elsif @previous_line_index.nil? and @buffer_of_lines[@line_index] == @line and old_line == @line @just_cursor_moving = true else @just_cursor_moving = false |