m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-17 15:53:39 -05:00

Add backward-eof event for --bind

This commit is contained in:
Junegunn Choi
2020-06-07 23:07:03 +09:00
parent 06d63a862e
commit a7aa08ce07
5 changed files with 40 additions and 5 deletions

View File

@@ -1746,6 +1746,17 @@ class TestGoFZF < TestBase
tmux.send_keys "seq 10000 | #{FZF} --read0 --keep-right", :Enter
tmux.until { |lines| assert lines.any_include?('9999 10000') }
end
def test_backward_eof
tmux.send_keys "echo foo | #{FZF} --bind 'backward-eof:reload(seq 100)'", :Enter
tmux.until { |lines| lines.item_count == 1 && lines.match_count == 1 }
tmux.send_keys 'x'
tmux.until { |lines| lines.item_count == 1 && lines.match_count == 0 }
tmux.send_keys :BSpace
tmux.until { |lines| lines.item_count == 1 && lines.match_count == 1 }
tmux.send_keys :BSpace
tmux.until { |lines| lines.item_count == 100 && lines.match_count == 100 }
end
end
module TestShell