mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Clear the preserved commit message on the UI thread
The commit's gpg onSuccess runs on a worker when the command output is streamed, so its ClearPreservedCommitMessage wrote commit-message context state off the UI thread. Bounce that write through OnUIThread.
This commit is contained in:
parent
12757e2723
commit
fefb3b632e
|
|
@ -149,7 +149,12 @@ func (self *WorkingTreeHelper) handleCommit(summary string, description string,
|
|||
self.c.LogAction(self.c.Tr.Actions.Commit)
|
||||
return self.gpgHelper.WithGpgHandlingAndSelectHeadCommit(cmdObj, git_commands.CommitGpgSign, self.c.Tr.CommittingStatus,
|
||||
func() error {
|
||||
self.commitsHelper.ClearPreservedCommitMessage()
|
||||
// This runs on a worker when the commit output is streamed, so
|
||||
// bounce the preserved-message write to the UI thread.
|
||||
self.c.OnUIThread(func() error {
|
||||
self.commitsHelper.ClearPreservedCommitMessage()
|
||||
return nil
|
||||
})
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue