Bounce commit files selection render to UI thread

The redraw of the selection color (using <space>) 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.
This commit is contained in:
Antoine Gaudreau Simard 2026-05-07 19:52:46 -04:00 committed by Stefan Haller
parent 3d324ed7fb
commit 225bcaa619

View file

@ -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
})
}