diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-02 14:38:09 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | b4827a98ca43bea26df5c7ae24135db4528ed467 (patch) | |
tree | 16b44809f9cbe88ef629d19a518813e73b46d4b0 | |
parent | 3ea5e4d4b2b0fa3f555a1562acce5fb729b6ca02 (diff) |
fix commit message panel
-rw-r--r-- | pkg/gui/editors.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkg/gui/editors.go b/pkg/gui/editors.go index ffd9116d3..0cddd1385 100644 --- a/pkg/gui/editors.go +++ b/pkg/gui/editors.go @@ -40,8 +40,12 @@ func (gui *Gui) commitMessageEditor(v *gocui.View, key gocui.Key, ch rune, mod g v.EditGotoToStartOfLine() case key == gocui.KeyCtrlE: v.EditGotoToEndOfLine() - case unicode.IsPrint(ch): + + // TODO: see if we need all three of these conditions: maybe the final one is sufficient + case ch != 0 && mod == 0 && unicode.IsPrint(ch): v.EditWrite(ch) + default: + matched = false } gui.RenderCommitLength() @@ -74,8 +78,12 @@ func (gui *Gui) defaultEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.M v.EditGotoToStartOfLine() case key == gocui.KeyCtrlE: v.EditGotoToEndOfLine() - case unicode.IsPrint(ch): + + // TODO: see if we need all three of these conditions: maybe the final one is sufficient + case ch != 0 && mod == 0 && unicode.IsPrint(ch): v.EditWrite(ch) + default: + matched = false } if gui.findSuggestions != nil { |