diff --git a/pkg/gui/controllers/commits_files_controller.go b/pkg/gui/controllers/commits_files_controller.go index 7cde6c15d..b12819c39 100644 --- a/pkg/gui/controllers/commits_files_controller.go +++ b/pkg/gui/controllers/commits_files_controller.go @@ -476,7 +476,11 @@ func (self *CommitFilesController) toggleForPatch(selectedNodes []*filetree.Comm self.c.Git().Patch.PatchBuilder.Reset() } - self.c.PostRefreshUpdate(self.context()) + self.c.OnUIThread(func() error { + self.c.PostRefreshUpdate(self.context()) + return nil + }) + return nil }) }