From 225bcaa619c4986fcd879d6aa6dca3b6727863c7 Mon Sep 17 00:00:00 2001 From: Antoine Gaudreau Simard Date: Thu, 7 May 2026 19:52:46 -0400 Subject: [PATCH] Bounce commit files selection render to UI thread The redraw of the selection color (using ) would be tied to the spinner drawing. To reproduce, having a high spinner refresh rate and toggling a file would see a delay equivalent to the time spinner refresh rate. --- pkg/gui/controllers/commits_files_controller.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 }) }