diff options
author | delthas <delthas@dille.cc> | 2022-04-15 23:51:14 +0200 |
---|---|---|
committer | delthas <delthas@dille.cc> | 2022-04-15 23:51:42 +0200 |
commit | 82acaacb15e5da69c9103894d05c5af72e848c5f (patch) | |
tree | 94846f3dfb483d567087bdb9eb6e8f432182b6b7 | |
parent | Fix home buffer tooltip (diff) |
Delete word on Alt+Backspace
This is a standard shortcut.
-rw-r--r-- | app.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -547,7 +547,12 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) { app.win.InputEnd() } case tcell.KeyBackspace, tcell.KeyBackspace2: - ok := app.win.InputBackspace() + var ok bool + if ev.Modifiers() == tcell.ModAlt { + ok = app.win.InputDeleteWord() + } else { + ok = app.win.InputBackspace() + } if ok { app.typing() } |