summaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorChing Pei Yang <badnam3o.0@gmail.com>2023-08-14 21:33:11 +0200
committerChing Pei Yang <badnam3o.0@gmail.com>2023-08-15 12:22:17 +0200
commit84372cfad927b2cead6eb2c8e6fcf363ec2d0f9d (patch)
treed7f6eb98a3c82933b4f503b57d3d08e07270ae2e /pkg
parente429415ed4980c21610b59a99abbb4d989fe2782 (diff)
Add emacs-keybinds for word navigation
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gui/editors.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gui/editors.go b/pkg/gui/editors.go
index fdbe67a39..69aabd684 100644
--- a/pkg/gui/editors.go
+++ b/pkg/gui/editors.go
@@ -16,11 +16,11 @@ 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:
+ case (key == gocui.KeyArrowLeft || ch == 'b') && (mod&gocui.ModAlt) != 0:
textArea.MoveLeftWord()
case key == gocui.KeyArrowLeft || key == gocui.KeyCtrlB:
textArea.MoveCursorLeft()
- case key == gocui.KeyArrowRight && (mod&gocui.ModAlt) != 0:
+ case (key == gocui.KeyArrowRight || ch == 'f') && (mod&gocui.ModAlt) != 0:
textArea.MoveRightWord()
case key == gocui.KeyArrowRight || key == gocui.KeyCtrlF:
textArea.MoveCursorRight()