diff options
author | Maas Lalani <maas@lalani.dev> | 2022-12-13 15:11:37 -0500 |
---|---|---|
committer | Maas Lalani <maas@lalani.dev> | 2022-12-13 15:11:37 -0500 |
commit | b4d7ebf2cb3c55400b666224a42d58b196938f7a (patch) | |
tree | 0bf5f2b8a3f1b5c34bebe51cd462f5b9146f8236 | |
parent | 240e163f012214a937f83b4a46cd500ca1bb5315 (diff) |
fix(write): exit with status 130 on escape
-rw-r--r-- | write/write.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/write/write.go b/write/write.go index 1674437..2e15415 100644 --- a/write/write.go +++ b/write/write.go @@ -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 } |