diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2019-11-02 19:41:59 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2019-11-02 19:41:59 +0900 |
| commit | 525040238e6b7cdec6b99962a60c8e0ccbd2b2e0 (patch) | |
| tree | 1a1271ec62b8b438db0fa1767c396c0974e0e472 /src | |
| parent | 33f89a08f32634d57cb145214e4647534433ac6c (diff) | |
| download | fzf-525040238e6b7cdec6b99962a60c8e0ccbd2b2e0.tar.gz | |
Fix behavior of 'deselect-all' to only deselect matches
To make it consistent with select-all and toggle-all.
Close #1364
Diffstat (limited to 'src')
| -rw-r--r-- | src/terminal.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/terminal.go b/src/terminal.go index 34df2105..4f66fdc0 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -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: |
