Skip to content

Commit

Permalink
fix(choose): --no-limit when 1 option available should still allow se…
Browse files Browse the repository at this point in the history
…lection
  • Loading branch information
maaslalani committed Jul 25, 2023
1 parent 6763de1 commit a61f3bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion choose/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a61f3bd

Please sign in to comment.