mirror of
https://github.com/charmbracelet/gum
synced 2024-05-23 16:42:22 +02:00
fix(choose): --no-limit when 1 option available should still allow selection
This commit is contained in:
parent
6763de12e8
commit
a61f3bdc3f
|
@ -46,7 +46,7 @@ func (o Options) Run() error {
|
|||
// If we've set no limit then we can simply select as many options as there
|
||||
// are so let's set the limit to the number of options.
|
||||
if o.NoLimit {
|
||||
o.Limit = len(o.Options)
|
||||
o.Limit = len(o.Options) + 1
|
||||
}
|
||||
|
||||
if len(o.Selected) > o.Limit {
|
||||
|
|
Loading…
Reference in a new issue