1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-22 05:29:44 +02:00

fix commit message prefix thingo

This commit is contained in:
Jesse Duffield 2021-10-26 09:39:28 +11:00 committed by github-actions[bot]
parent 3eb124c732
commit 01d82749b1

View File

@ -393,10 +393,11 @@ func (gui *Gui) handleCommitPress() error {
return gui.createErrorPanel(fmt.Sprintf("%s: %s", gui.Tr.LcCommitPrefixPatternError, err.Error())) return gui.createErrorPanel(fmt.Sprintf("%s: %s", gui.Tr.LcCommitPrefixPatternError, err.Error()))
} }
prefix := rgx.ReplaceAllString(gui.getCheckedOutBranch().Name, prefixReplace) prefix := rgx.ReplaceAllString(gui.getCheckedOutBranch().Name, prefixReplace)
gui.renderString(gui.Views.CommitMessage, prefix) gui.Views.CommitMessage.ClearTextArea()
if err := gui.Views.CommitMessage.SetCursor(len(prefix), 0); err != nil { gui.Views.CommitMessage.TextArea.TypeString(prefix)
return err gui.g.Update(func(*gocui.Gui) error {
} return nil
})
} }
gui.g.Update(func(g *gocui.Gui) error { gui.g.Update(func(g *gocui.Gui) error {