mirror of
https://github.com/jesseduffield/lazygit.git
synced 2024-12-12 11:15:00 +02:00
Add emacs-keybinds for word navigation (#2935)
This commit is contained in:
commit
689deb72bd
@ -16,11 +16,11 @@ func (gui *Gui) handleEditorKeypress(textArea *gocui.TextArea, key gocui.Key, ch
|
|||||||
textArea.MoveCursorDown()
|
textArea.MoveCursorDown()
|
||||||
case key == gocui.KeyArrowUp:
|
case key == gocui.KeyArrowUp:
|
||||||
textArea.MoveCursorUp()
|
textArea.MoveCursorUp()
|
||||||
case key == gocui.KeyArrowLeft && (mod&gocui.ModAlt) != 0:
|
case (key == gocui.KeyArrowLeft || ch == 'b') && (mod&gocui.ModAlt) != 0:
|
||||||
textArea.MoveLeftWord()
|
textArea.MoveLeftWord()
|
||||||
case key == gocui.KeyArrowLeft || key == gocui.KeyCtrlB:
|
case key == gocui.KeyArrowLeft || key == gocui.KeyCtrlB:
|
||||||
textArea.MoveCursorLeft()
|
textArea.MoveCursorLeft()
|
||||||
case key == gocui.KeyArrowRight && (mod&gocui.ModAlt) != 0:
|
case (key == gocui.KeyArrowRight || ch == 'f') && (mod&gocui.ModAlt) != 0:
|
||||||
textArea.MoveRightWord()
|
textArea.MoveRightWord()
|
||||||
case key == gocui.KeyArrowRight || key == gocui.KeyCtrlF:
|
case key == gocui.KeyArrowRight || key == gocui.KeyCtrlF:
|
||||||
textArea.MoveCursorRight()
|
textArea.MoveCursorRight()
|
||||||
|
Loading…
Reference in New Issue
Block a user