diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2021-12-04 11:46:15 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2021-12-05 21:13:10 +0900 |
| commit | 43f0d0cacde99ba5fdcc32d774cfd8849a6af2b5 (patch) | |
| tree | 36a9b857991d9a1bb0a7c0789f5f54d6ed6d87ea /test | |
| parent | 20b4e6953ec439f52e9bdcc06ac6ee5bb590d39d (diff) | |
| download | fzf-43f0d0cacde99ba5fdcc32d774cfd8849a6af2b5.tar.gz | |
change-preview-window to take multiple option sets separated by '|'
So you can "rotate" through the different options with a single binding.
fzf --preview 'cat {}' \
--bind 'ctrl-/:change-preview-window(70%|down,40%,border-horizontal|hidden|)'
Close #2376
Diffstat (limited to 'test')
| -rwxr-xr-x | test/test_go.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/test_go.rb b/test/test_go.rb index 3fc66f94..95759bfa 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -2191,6 +2191,23 @@ class TestGoFZF < TestBase assert_equal ' 3', lines[1] end end + + def test_change_preview_window_rotate + tmux.send_keys "seq 100 | #{FZF} --preview-window left,border-none --preview 'echo hello' --bind '" \ + "a:change-preview-window(right|down|up|hidden|)'", :Enter + 3.times do + tmux.until { |lines| lines[0].start_with?('hello') } + tmux.send_keys 'a' + tmux.until { |lines| lines[0].end_with?('hello') } + tmux.send_keys 'a' + tmux.until { |lines| lines[-1].start_with?('hello') } + tmux.send_keys 'a' + tmux.until { |lines| assert_equal 'hello', lines[0] } + tmux.send_keys 'a' + tmux.until { |lines| refute_includes lines[0], 'hello' } + tmux.send_keys 'a' + end + end end module TestShell |
