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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user