summaryrefslogtreecommitdiff
path: root/ui/ui.go
diff options
context:
space:
mode:
authorAlexey Yerin <yyp@disroot.org>2021-04-27 19:23:26 +0300
committerHubert Hirtz <hubert@hirtz.pm>2021-04-27 19:32:20 +0200
commitd12564cc5e2b145f7c6d4122b98dbe2ac9ea620e (patch)
tree840089a2b24fba046463edc35f07076fc98fbba9 /ui/ui.go
parentAdd BUFFER command to jump to the matching buffer (diff)
editor: Ctrl+{Right,Left} moves cursor by words
A very useful readline feature when combined with ^W can be a really quick way to reformat a sentence, which is what I do on IRC quite often.
Diffstat (limited to 'ui/ui.go')
-rw-r--r--ui/ui.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 9ab9024..86608d1 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -176,10 +176,18 @@ func (ui *UI) InputRight() {
ui.e.Right()
}
+func (ui *UI) InputRightWord() {
+ ui.e.RightWord()
+}
+
func (ui *UI) InputLeft() {
ui.e.Left()
}
+func (ui *UI) InputLeftWord() {
+ ui.e.LeftWord()
+}
+
func (ui *UI) InputHome() {
ui.e.Home()
}