m/fzf
1
0
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:
James Wright
2020-02-27 10:38:32 -07:00
committed by GitHub
parent d8cb5c1cf5
commit 9f0626da64
4 changed files with 72 additions and 47 deletions

View File

@@ -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