From 5be97c61456cbfb587edc3e532d2a19a5c40e6d2 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Wed, 2 Jul 2025 15:49:51 +0200 Subject: [PATCH] Remove another unnecessary refresh This was added after this PR comment: https://github.com/jesseduffield/lazygit/pull/3276#discussion_r1469077611 > Can we do a refresh after this reset so that the screen shows that the patch > has been cancelled? That way, if we cancel on the next popup, the screen will > be in a valid state. I don't understand what "cancel on the next popup" means; there is no further popup after this code. --- pkg/gui/controllers/commits_files_controller.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/gui/controllers/commits_files_controller.go b/pkg/gui/controllers/commits_files_controller.go index 5529659e0..9febcc534 100644 --- a/pkg/gui/controllers/commits_files_controller.go +++ b/pkg/gui/controllers/commits_files_controller.go @@ -313,9 +313,6 @@ func (self *CommitFilesController) discard(selectedNodes []*filetree.CommitFileN // Reset the current patch if there is one. if self.c.Git().Patch.PatchBuilder.Active() { self.c.Git().Patch.PatchBuilder.Reset() - if err := self.c.Refresh(types.RefreshOptions{Mode: types.BLOCK_UI}); err != nil { - return err - } } for _, node := range selectedNodes {