fix: don't allow selecting negative value if it is an empty string

This commit is contained in:
Maas Lalani 2022-10-06 13:15:53 -04:00
parent a4d4793829
commit f69fc23242

View file

@ -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