mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 00:03:39 -05:00
Add backward-delete-char/eof action (#1891)
'backward-delete-char/eof' will either abort if query is empty or delete one character backwards.
This commit is contained in:
@@ -1710,6 +1710,20 @@ class TestGoFZF < TestBase
|
||||
tmux.until { |lines| lines.match_count.zero? }
|
||||
tmux.until { |lines| !lines[-2].include?('(1)') }
|
||||
end
|
||||
|
||||
def test_backward_delete_char_eof
|
||||
tmux.send_keys "seq 1000 | #{fzf "--bind 'bs:backward-delete-char/eof'"}", :Enter
|
||||
tmux.until { |lines| lines[-2] == ' 1000/1000' }
|
||||
tmux.send_keys '11'
|
||||
tmux.until { |lines| lines[-1] == '> 11' }
|
||||
tmux.send_keys :BSpace
|
||||
tmux.until { |lines| lines[-1] == '> 1' }
|
||||
tmux.send_keys :BSpace
|
||||
tmux.until { |lines| lines[-1] == '>' }
|
||||
tmux.send_keys :BSpace
|
||||
tmux.prepare
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
module TestShell
|
||||
|
||||
Reference in New Issue
Block a user