mirror of
https://github.com/charmbracelet/gum
synced 2024-05-13 11:46:40 +02:00
fix: don't allow selecting negative value if it is an empty string
This commit is contained in:
parent
a4d4793829
commit
f69fc23242
|
@ -63,6 +63,9 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
return m, tea.Quit
|
||||
case "left", "h", "ctrl+p", "tab",
|
||||
"right", "l", "ctrl+n", "shift+tab":
|
||||
if m.negative == "" {
|
||||
break
|
||||
}
|
||||
m.confirmation = !m.confirmation
|
||||
case "enter":
|
||||
m.quitting = true
|
||||
|
|
Loading…
Reference in a new issue