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

Fix behavior of 'deselect-all' to only deselect matches

To make it consistent with select-all and toggle-all.

Close #1364
This commit is contained in:
Junegunn Choi
2019-11-02 19:41:59 +09:00
parent 33f89a08f3
commit 525040238e
2 changed files with 14 additions and 4 deletions

View File

@@ -1837,8 +1837,12 @@ func (t *Terminal) Loop() {
}
case actDeselectAll:
if t.multi > 0 {
t.selected = make(map[int32]selectedItem)
t.version++
for i := 0; i < t.merger.Length() && len(t.selected) > 0; i++ {
item := t.merger.Get(i).item
if _, found := t.selected[item.Index()]; found {
t.deselectItem(item)
}
}
req(reqList, reqInfo)
}
case actToggle: