fix(choose): Ctrl+C should not return any items if selected

This commit is contained in:
Maas Lalani 2022-07-30 17:00:07 -04:00
parent c886eb142e
commit c17387b919
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -72,6 +72,10 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.paginator.PrevPage()
case "ctrl+c":
m.quitting = true
// Ctrl+C should unselect all items
for i := range m.items {
m.items[i].selected = false
}
return m, tea.Quit
case " ", "x":
if m.limit == 1 {