From 318f47a6aaa193a3fb27e58e8e76cd26632a0130 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Thu, 20 Feb 2020 09:44:58 -0500 Subject: [PATCH] Sort keybindings --- input/input.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/input/input.go b/input/input.go index 4e470ec..649d899 100644 --- a/input/input.go +++ b/input/input.go @@ -82,20 +82,20 @@ func Update(msg tea.Msg, m Model) (Model, tea.Cmd) { m.pos-- } return m, nil - case tea.KeyCtrlF: // ^F, forward one character - fallthrough case tea.KeyLeft: if m.pos > 0 { m.pos-- } return m, nil - case tea.KeyCtrlB: // ^B, back one charcter - fallthrough case tea.KeyRight: if m.pos < len(m.Value) { m.pos++ } return m, nil + case tea.KeyCtrlF: // ^F, forward one character + fallthrough + case tea.KeyCtrlB: // ^B, back one charcter + fallthrough case tea.KeyCtrlA: // ^A, beginning m.pos = 0 return m, nil