mirror of
https://github.com/charmbracelet/gum
synced 2024-05-13 03:36:42 +02:00
Fix for using --value in combination w/ --no-fuzzy
This add a check if the no fuzzy flag is set together with the --no-fuzzy flag.
This commit is contained in:
parent
2bda001480
commit
708a653eae
|
@ -53,8 +53,13 @@ func (o Options) Run() error {
|
|||
var matches []fuzzy.Match
|
||||
if o.Value != "" {
|
||||
i.SetValue(o.Value)
|
||||
}
|
||||
switch {
|
||||
case o.Value != "" && o.Fuzzy:
|
||||
matches = fuzzy.Find(o.Value, choices)
|
||||
} else {
|
||||
case o.Value != "" && !o.Fuzzy:
|
||||
matches = exactMatches(o.Value, choices)
|
||||
default:
|
||||
matches = matchAll(choices)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue