summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-10-17 20:11:16 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-10-17 20:14:31 +1100
commita05f22efa2288b4d05ab2d884590565853dc6b9f (patch)
tree1210f5f7133eb8da450d69774e260cc6c1d53205 /pkg/gui
parentc0cd9dd83535522caa3b7908b33d535df96e04b3 (diff)
support home/end keys in editors
Diffstat (limited to 'pkg/gui')
-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 6cc6409cb..b94e6b5bd 100644
--- a/pkg/gui/editors.go
+++ b/pkg/gui/editors.go
@@ -37,9 +37,9 @@ func (gui *Gui) handleEditorKeypress(textArea *gocui.TextArea, key gocui.Key, ch
textArea.ToggleOverwrite()
case key == gocui.KeyCtrlU:
textArea.DeleteToStartOfLine()
- case key == gocui.KeyCtrlA:
+ case key == gocui.KeyCtrlA || key == gocui.KeyHome:
textArea.GoToStartOfLine()
- case key == gocui.KeyCtrlE:
+ case key == gocui.KeyCtrlE || key == gocui.KeyEnd:
textArea.GoToEndOfLine()
// TODO: see if we need all three of these conditions: maybe the final one is sufficient