summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-10-06 11:26:10 -0700
committerGitHub <noreply@github.com>2022-10-06 11:26:10 -0700
commit2f76ef58f1604b215ae3e82661ff4f0ab6bf0786 (patch)
tree6f0e4f212aa0e3f7f3e881691a4db3fda1858746
parent056cc1482168f0b7163325c1ebe20b6bcc6061ef (diff)
parente436922eb60771130f4a6c6222f46b41ccb62022 (diff)
Merge pull request #2204 from Ryooooooga/move-by-word
-rw-r--r--pkg/gui/editors.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/gui/editors.go b/pkg/gui/editors.go
index 20223d117..9e00f8351 100644
--- a/pkg/gui/editors.go
+++ b/pkg/gui/editors.go
@@ -22,8 +22,12 @@ func (gui *Gui) handleEditorKeypress(textArea *gocui.TextArea, key gocui.Key, ch
textArea.MoveCursorDown()
case key == gocui.KeyArrowUp:
textArea.MoveCursorUp()
+ case key == gocui.KeyArrowLeft && (mod&gocui.ModAlt) != 0:
+ textArea.MoveLeftWord()
case key == gocui.KeyArrowLeft || key == gocui.KeyCtrlB:
textArea.MoveCursorLeft()
+ case key == gocui.KeyArrowRight && (mod&gocui.ModAlt) != 0:
+ textArea.MoveRightWord()
case key == gocui.KeyArrowRight || key == gocui.KeyCtrlF:
textArea.MoveCursorRight()
case key == newlineKey: