1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00

when toggling files reset patch manager if patch ends up empty

This commit is contained in:
Jesse Duffield 2020-08-22 09:22:22 +10:00
parent 0ac402792b
commit 26f80087dd

View File

@ -141,6 +141,10 @@ func (gui *Gui) handleToggleFileForPatch(g *gocui.Gui, v *gocui.View) error {
gui.GitCommand.PatchManager.ToggleFileWhole(commitFile.Name) gui.GitCommand.PatchManager.ToggleFileWhole(commitFile.Name)
if gui.GitCommand.PatchManager.IsEmpty() {
gui.GitCommand.PatchManager.Reset()
}
return gui.refreshCommitFilesView() return gui.refreshCommitFilesView()
} }