1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-11 13:53:25 +02:00

fix commit message panel

This commit is contained in:
Jesse Duffield 2021-04-02 14:38:09 +11:00
parent 3ea5e4d4b2
commit b4827a98ca

View File

@ -40,8 +40,12 @@ func (gui *Gui) commitMessageEditor(v *gocui.View, key gocui.Key, ch rune, mod g
v.EditGotoToStartOfLine() v.EditGotoToStartOfLine()
case key == gocui.KeyCtrlE: case key == gocui.KeyCtrlE:
v.EditGotoToEndOfLine() 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) v.EditWrite(ch)
default:
matched = false
} }
gui.RenderCommitLength() gui.RenderCommitLength()
@ -74,8 +78,12 @@ func (gui *Gui) defaultEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.M
v.EditGotoToStartOfLine() v.EditGotoToStartOfLine()
case key == gocui.KeyCtrlE: case key == gocui.KeyCtrlE:
v.EditGotoToEndOfLine() 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) v.EditWrite(ch)
default:
matched = false
} }
if gui.findSuggestions != nil { if gui.findSuggestions != nil {