diff --git a/pkg/gui/commit_files_panel.go b/pkg/gui/commit_files_panel.go index 55a2bde52..6e3cd4b1f 100644 --- a/pkg/gui/commit_files_panel.go +++ b/pkg/gui/commit_files_panel.go @@ -141,6 +141,10 @@ func (gui *Gui) handleToggleFileForPatch(g *gocui.Gui, v *gocui.View) error { gui.GitCommand.PatchManager.ToggleFileWhole(commitFile.Name) + if gui.GitCommand.PatchManager.IsEmpty() { + gui.GitCommand.PatchManager.Reset() + } + return gui.refreshCommitFilesView() }