mirror of
https://github.com/charmbracelet/gum
synced 2024-06-19 22:15:09 +02:00
fix(write): exit with status 130 on escape
This commit is contained in:
parent
240e163f01
commit
b4d7ebf2cb
|
@ -41,11 +41,11 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||||
switch msg := msg.(type) {
|
switch msg := msg.(type) {
|
||||||
case tea.KeyMsg:
|
case tea.KeyMsg:
|
||||||
switch msg.String() {
|
switch msg.String() {
|
||||||
case "ctrl+c":
|
case "ctrl+c", "esc":
|
||||||
m.aborted = true
|
m.aborted = true
|
||||||
m.quitting = true
|
m.quitting = true
|
||||||
return m, tea.Quit
|
return m, tea.Quit
|
||||||
case "esc", "ctrl+d":
|
case "ctrl+d":
|
||||||
m.quitting = true
|
m.quitting = true
|
||||||
return m, tea.Quit
|
return m, tea.Quit
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue