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

allow entering and returning from submodule

This commit is contained in:
Jesse Duffield
2020-09-29 09:02:44 +10:00
parent b882ac9e06
commit 914fb36173
4 changed files with 49 additions and 14 deletions

View File

@@ -49,6 +49,18 @@ func (gui *Gui) handleTopLevelReturn(g *gocui.Gui, v *gocui.View) error {
}
}
repoPathStack := gui.State.RepoPathStack
if len(repoPathStack) > 0 {
n := len(repoPathStack) - 1
path := repoPathStack[n]
gui.State.RepoPathStack = repoPathStack[:n]
return gui.dispatchSwitchToRepo(path)
}
if gui.Config.GetUserConfig().GetBool("quitOnTopLevelReturn") {
return gui.handleQuit()
}