From 6cd93de5b9ba4938cbe648eeab034fc813eb1243 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 7 Jul 2026 10:18:52 +0200 Subject: [PATCH] Cancel the commit-file range selection on the UI thread after discard The discard handler cancelled the commit-files range selection from its WithWaitingStatus worker. Bounce it through OnUIThread, keeping it after the successful CheckMergeOrRebase as before. --- pkg/gui/controllers/commits_files_controller.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/gui/controllers/commits_files_controller.go b/pkg/gui/controllers/commits_files_controller.go index 07979de5f..b90e14b74 100644 --- a/pkg/gui/controllers/commits_files_controller.go +++ b/pkg/gui/controllers/commits_files_controller.go @@ -363,9 +363,12 @@ func (self *CommitFilesController) discard(selectedNodes []*filetree.CommitFileN return err } - if self.context().RangeSelectEnabled() { - self.context().GetList().CancelRangeSelect() - } + self.c.OnUIThread(func() error { + if self.context().RangeSelectEnabled() { + self.context().GetList().CancelRangeSelect() + } + return nil + }) return nil })