1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

better handling of our different modes and also cherry picking

This commit is contained in:
Jesse Duffield
2020-08-22 11:44:03 +10:00
parent fbd61fcd17
commit c2b154acad
13 changed files with 185 additions and 46 deletions

View File

@@ -41,15 +41,10 @@ func (gui *Gui) handleTopLevelReturn(g *gocui.Gui, v *gocui.View) error {
return gui.switchContext(currentContext.GetParentContext())
}
if gui.inDiffMode() {
return gui.exitDiffMode()
}
if gui.inFilterMode() {
return gui.exitFilterMode()
}
if gui.GitCommand.PatchManager.Active() {
return gui.handleResetPatch()
for _, mode := range gui.modeStatuses() {
if mode.isActive() {
return mode.onReset()
}
}
if gui.Config.GetUserConfig().GetBool("quitOnTopLevelReturn") {