From b4827a98ca43bea26df5c7ae24135db4528ed467 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Fri, 2 Apr 2021 14:38:09 +1100 Subject: [PATCH] fix commit message panel --- pkg/gui/editors.go | 12 ++++++++++-- 1 file 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 {