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 9d68b287db
commit a57310df24
7 changed files with 127 additions and 8 deletions

View file

@ -111,7 +111,7 @@ func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage strin
func (self *WorkingTreeHelper) handleCommit(message string) error {
cmdObj := self.c.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