fix(write): exit with status 130 on escape

This commit is contained in:
Maas Lalani 2022-12-13 15:11:37 -05:00
parent 240e163f01
commit b4d7ebf2cb
No known key found for this signature in database
GPG key ID: 5A6ED5CBF1A0A000

View file

@ -41,11 +41,11 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
switch msg := msg.(type) {
case tea.KeyMsg:
switch msg.String() {
case "ctrl+c":
case "ctrl+c", "esc":
m.aborted = true
m.quitting = true
return m, tea.Quit
case "esc", "ctrl+d":
case "ctrl+d":
m.quitting = true
return m, tea.Quit
}