mirror of
https://github.com/charmbracelet/gum
synced 2024-05-17 13:46:42 +02:00
feat: escape as abort option (like ctrl+c)
This commit is contained in:
parent
cdd7b7b6ba
commit
197e52a362
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue