summaryrefslogtreecommitdiffstats
path: root/pkg/gui/editors.go
diff options
context:
space:
mode:
authorRyooooooga <eial5q265e5@gmail.com>2022-10-05 22:29:51 +0900
committerRyooooooga <eial5q265e5@gmail.com>2022-10-05 22:29:55 +0900
commite436922eb60771130f4a6c6222f46b41ccb62022 (patch)
tree6f0e4f212aa0e3f7f3e881691a4db3fda1858746 /pkg/gui/editors.go
parent056cc1482168f0b7163325c1ebe20b6bcc6061ef (diff)
feat(editors.go): move by words
Diffstat (limited to 'pkg/gui/editors.go')
-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: