Skip to content
Myr

fix(filter): take pre-filtering into account

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Carlos Alexandro Becker · committed by Carlos Alexandro Becker · parent b0ec3a7 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • other:+4 added−4 removed

1 file+4 added−4 removed

modified:filter/command.go+4 added-4 removed
125 unmodified lines
126127 isSelectAll := len(o.Selected) == 1 && o.Selected[0] == "*"128 currentSelected := 0129 if len(o.Selected) > 0 {130 for i, option := range o.Options {131 if currentSelected >= o.Limit || (!isSelectAll && !slices.Contains(o.Selected, option)) {130 for i, option := range matches {131 if currentSelected >= o.Limit || (!isSelectAll && !slices.Contains(o.Selected, option.Str)) {132 continue133 }134 if o.Limit == 1 {135 m.cursor = i136 m.selected[option] = struct{}{}136 m.selected[option.Str] = struct{}{}137 } else {138 currentSelected++139 m.selected[option] = struct{}{}139 m.selected[option.Str] = struct{}{}140 }141 }142 }143
29 unmodified lines