diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2019-11-12 00:57:19 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2019-11-12 00:57:19 +0900 |
| commit | 05b5f3f845a88e9b034f3302bb50672fc5b7f8c7 (patch) | |
| tree | d3e9f3fb141ed38bcd245866100e5dd0a0e3b264 | |
| parent | 7e1c0f39e76864ad0aa4d5c88d074b1055a617a6 (diff) | |
| download | fzf-05b5f3f845a88e9b034f3302bb50672fc5b7f8c7.tar.gz | |
'reload' action should reset multi-selection
| -rw-r--r-- | src/terminal.go | 1 | ||||
| -rwxr-xr-x | test/test_go.rb | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index d1fbe40d..c5ff3025 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -2047,6 +2047,7 @@ func (t *Terminal) Loop() { command := replacePlaceholder(a.a, t.ansi, t.delimiter, t.printsep, false, string(t.input), list) newCommand = &command + t.selected = make(map[int32]selectedItem) } } return true diff --git a/test/test_go.rb b/test/test_go.rb index a441e5ee..210f8fec 100755 --- a/test/test_go.rb +++ b/test/test_go.rb @@ -1623,14 +1623,17 @@ class TestGoFZF < TestBase end def test_reload - tmux.send_keys %(seq 1000 | #{FZF} --bind 'change:reload(seq {q}),a:reload(seq 100),b:reload:seq 200' --header-lines 2), :Enter + tmux.send_keys %(seq 1000 | #{FZF} --bind 'change:reload(seq {q}),a:reload(seq 100),b:reload:seq 200' --header-lines 2 --multi 2), :Enter tmux.until { |lines| lines.match_count == 998 } tmux.send_keys 'a' tmux.until { |lines| lines.item_count == 98 && lines.match_count == 98 } tmux.send_keys 'b' tmux.until { |lines| lines.item_count == 198 && lines.match_count == 198 } + tmux.send_keys :Tab + tmux.until { |lines| lines[-2].include?('(1/2)') } tmux.send_keys '555' tmux.until { |lines| lines.item_count == 553 && lines.match_count == 1 } + tmux.until { |lines| !lines[-2].include?('(1/2)') } end end |
