1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-20 05:19:24 +02:00

feat(editors.go): move by words

This commit is contained in:
Ryooooooga 2022-10-05 22:29:51 +09:00
parent 056cc14821
commit e436922eb6
No known key found for this signature in database
GPG Key ID: 07CF200DFCC20C25

View File

@ -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: