From a05f22efa2288b4d05ab2d884590565853dc6b9f Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sun, 17 Oct 2021 20:11:16 +1100 Subject: support home/end keys in editors --- pkg/gui/editors.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/gui') 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 -- cgit v1.2.3