mirror of
https://github.com/charmbracelet/gum
synced 2024-06-26 17:20:16 +02:00
bugfix: Only display Cancel if explicitly asked for
This commit is contained in:
parent
ccd452b35a
commit
dfe8ce6a45
|
@ -24,7 +24,11 @@ func (o Options) Run() error {
|
|||
// set options
|
||||
options = append(options, o.Affirmative)
|
||||
options = append(options, o.Negative)
|
||||
options = append(options, o.Canceled)
|
||||
if o.WithCancel {
|
||||
options = append(options, o.Canceled)
|
||||
} else {
|
||||
options = append(options, "")
|
||||
}
|
||||
|
||||
// what is default
|
||||
theDefault = o.Default
|
||||
|
|
Loading…
Reference in a new issue