From 5b6a8a304e3914b980c33f5580adb04501a736cb Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 7 Mar 2026 20:44:56 +1100 Subject: [PATCH] Prevent patch building panel from briefly appearing when discarding change from commit --- pkg/gui/controllers/patch_building_controller.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/gui/controllers/patch_building_controller.go b/pkg/gui/controllers/patch_building_controller.go index f20173d53..4d418d7df 100644 --- a/pkg/gui/controllers/patch_building_controller.go +++ b/pkg/gui/controllers/patch_building_controller.go @@ -224,13 +224,13 @@ func (self *PatchBuildingController) discardSelectionFromCommit() error { return nil } - self.c.Helpers().PatchBuilding.Escape() - - return self.c.WithWaitingStatus(self.c.Tr.RebasingStatus, func(gocui.Task) error { + return self.c.WithWaitingStatusSync(self.c.Tr.RebasingStatus, func() error { commitIndex := self.getPatchCommitIndex() self.c.LogAction(self.c.Tr.Actions.RemovePatchFromCommit) err := self.c.Git().Patch.DeletePatchesFromCommit(self.c.Model().Commits, commitIndex) - return self.c.Helpers().MergeAndRebase.CheckMergeOrRebase(err) + self.c.Helpers().PatchBuilding.Escape() + return self.c.Helpers().MergeAndRebase.CheckMergeOrRebaseWithRefreshOptions( + err, types.RefreshOptions{Mode: types.SYNC}) }) }