Retain commit message when cycling history

When cycling history, we want to make it so that upon returning to the original prompt, you get your text back.
Importantly, we don't want to use the existing preservedMessage field for that because that's only for preserving
a NEW commit message, and we don't want the history stuff of the commit reword flow to overwrite that.
This commit is contained in:
Jesse Duffield 2023-04-29 20:04:43 +10:00
parent 49da7b482d
commit 0cd5257523
8 changed files with 149 additions and 16 deletions

View file

@ -124,7 +124,7 @@ func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage strin
func (self *WorkingTreeHelper) handleCommit(message string) error {
cmdObj := self.git.Commit.CommitCmdObj(message)
self.c.LogAction(self.c.Tr.Actions.Commit)
_ = self.commitsHelper.EscapeCommitsPanel()
_ = self.commitsHelper.PopCommitMessageContexts()
return self.gpgHelper.WithGpgHandling(cmdObj, self.c.Tr.CommittingStatus, func() error {
self.commitsHelper.OnCommitSuccess()
return nil