1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-23 22:24:51 +02:00

support home/end keys in editors

This commit is contained in:
Jesse Duffield
2021-10-17 20:11:16 +11:00
parent c0cd9dd835
commit a05f22efa2
5 changed files with 8 additions and 6 deletions

View File

@@ -49,9 +49,9 @@ func simpleEditor(v *View, key Key, ch rune, mod Modifier) bool {
v.TextArea.ToggleOverwrite()
case key == KeyCtrlU:
v.TextArea.DeleteToStartOfLine()
case key == KeyCtrlA:
case key == KeyCtrlA || key == KeyHome:
v.TextArea.GoToStartOfLine()
case key == KeyCtrlE:
case key == KeyCtrlE || key == KeyEnd:
v.TextArea.GoToEndOfLine()
// TODO: see if we need all three of these conditions: maybe the final one is sufficient

2
vendor/modules.txt vendored
View File

@@ -152,7 +152,7 @@ github.com/jesseduffield/go-git/v5/utils/merkletrie/filesystem
github.com/jesseduffield/go-git/v5/utils/merkletrie/index
github.com/jesseduffield/go-git/v5/utils/merkletrie/internal/frame
github.com/jesseduffield/go-git/v5/utils/merkletrie/noder
# github.com/jesseduffield/gocui v0.3.1-0.20211017063715-c74848d8ad00
# github.com/jesseduffield/gocui v0.3.1-0.20211017091015-8bf4a4666b77
## explicit
github.com/jesseduffield/gocui
# github.com/jesseduffield/yaml v2.1.0+incompatible