mirror of
https://github.com/junegunn/fzf.git
synced 2025-08-07 23:52:04 -07:00
'reload' action should reset multi-selection
This commit is contained in:
@@ -2047,6 +2047,7 @@ func (t *Terminal) Loop() {
|
|||||||
command := replacePlaceholder(a.a,
|
command := replacePlaceholder(a.a,
|
||||||
t.ansi, t.delimiter, t.printsep, false, string(t.input), list)
|
t.ansi, t.delimiter, t.printsep, false, string(t.input), list)
|
||||||
newCommand = &command
|
newCommand = &command
|
||||||
|
t.selected = make(map[int32]selectedItem)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
@@ -1623,14 +1623,17 @@ class TestGoFZF < TestBase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_reload
|
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.until { |lines| lines.match_count == 998 }
|
||||||
tmux.send_keys 'a'
|
tmux.send_keys 'a'
|
||||||
tmux.until { |lines| lines.item_count == 98 && lines.match_count == 98 }
|
tmux.until { |lines| lines.item_count == 98 && lines.match_count == 98 }
|
||||||
tmux.send_keys 'b'
|
tmux.send_keys 'b'
|
||||||
tmux.until { |lines| lines.item_count == 198 && lines.match_count == 198 }
|
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.send_keys '555'
|
||||||
tmux.until { |lines| lines.item_count == 553 && lines.match_count == 1 }
|
tmux.until { |lines| lines.item_count == 553 && lines.match_count == 1 }
|
||||||
|
tmux.until { |lines| !lines[-2].include?('(1/2)') }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user