when toggling files reset patch manager if patch ends up empty

This commit is contained in:
Jesse Duffield
2020-08-23 14:29:18 +10:00
parent 0ac402792b
commit 26f80087dd
+4
View File
@@ -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()
}