feat: escape as abort option (like ctrl+c)

This commit is contained in:
Maas Lalani 2022-08-02 21:00:42 -04:00
parent cdd7b7b6ba
commit 197e52a362
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000
2 changed files with 2 additions and 2 deletions

View file

@ -87,7 +87,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.items[i].selected = false
}
m.numSelected = 0
case "ctrl+c":
case "ctrl+c", "esc":
m.aborted = true
m.quitting = true
return m, tea.Quit

View file

@ -48,7 +48,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.quitting = true
m.confirmation = true
return m, tea.Quit
case "ctrl+c", "q", "n", "N":
case "ctrl+c", "esc", "q", "n", "N":
m.confirmation = false
m.quitting = true
return m, tea.Quit