mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-30 10:05:58 +00: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:
1 parent
d8cb5c1cf5
commit
9f0626da64
4 files changed
+72
-47
No files matched your search
@@ -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