diff options
author | Alexey Yerin <yyp@disroot.org> | 2021-04-26 13:18:01 +0300 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-04-26 22:41:06 +0200 |
commit | a7f7c5ad40a3f6960ba61e67f737ddef56408d6e (patch) | |
tree | 1b41942c6614087f862d193f654a33fb1c47cf45 /ui/ui.go | |
parent | Don't show own typing notifications (diff) |
editor: add ^W delete word binding
It allows to delete the current word (any string of characters until a
space). Also, all spaces at the start are cleared to allow doing
something like:
Hello world|
Hello | <- the cursor is at a space
| <- nothing left
Diffstat (limited to 'ui/ui.go')
-rw-r--r-- | ui/ui.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -192,6 +192,10 @@ func (ui *UI) InputDelete() (ok bool) { return ui.e.RemRuneForward() } +func (ui *UI) InputDeleteWord() (ok bool) { + return ui.e.RemWord() +} + func (ui *UI) InputAutoComplete(offset int) (ok bool) { return ui.e.AutoComplete(offset) } |