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:
parent
0ac402792b
commit
26f80087dd
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user