Update preview window when selection has changed

Close #995
This commit is contained in:
Junegunn Choi
2017-07-28 01:39:25 +09:00
parent bc3983181d
commit a0a3c349c9
2 changed files with 36 additions and 20 deletions

View File

@@ -1274,6 +1274,16 @@ class TestGoFZF < TestBase
tmux.until { |lines| lines[-3] == '> 11' }
tmux.send_keys :Enter
end
def test_preview_update_on_select
tmux.send_keys(%(seq 10 | fzf -m --preview 'echo {+}' --bind a:toggle-all),
:Enter)
tmux.until { |lines| lines.item_count == 10 }
tmux.send_keys 'a'
tmux.until { |lines| lines.any? { |line| line.include? '1 2 3 4 5' } }
tmux.send_keys 'a'
tmux.until { |lines| !lines.any? { |line| line.include? '1 2 3 4 5' } }
end
end
module TestShell