summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2022-04-15 23:51:14 +0200
committerdelthas <delthas@dille.cc>2022-04-15 23:51:42 +0200
commit82acaacb15e5da69c9103894d05c5af72e848c5f (patch)
tree94846f3dfb483d567087bdb9eb6e8f432182b6b7 /app.go
parentFix home buffer tooltip (diff)
Delete word on Alt+Backspace
This is a standard shortcut.
Diffstat (limited to 'app.go')
-rw-r--r--app.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/app.go b/app.go
index e6a7b4b..421b569 100644
--- a/app.go
+++ b/app.go
@@ -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()
}