diff options
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r-- | pkg/gui/gui.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index 94634113b..d35fe59be 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -317,6 +317,10 @@ type guiState struct { // Some views move between windows for example the commitFiles view and when cycling through // side windows we need to know which view to give focus to for a given window WindowViewNameMap map[string]string + + // when you enter into a submodule we'll append the superproject's path to this array + // so that you can return to the superproject + RepoPathStack []string } func (gui *Gui) resetState() { @@ -329,10 +333,12 @@ func (gui *Gui) resetState() { CherryPickedCommits: make([]*commands.Commit, 0), ContextKey: "", } + prevRepoPathStack := []string{} if gui.State != nil { prevFiltering = gui.State.Modes.Filtering prevDiff = gui.State.Modes.Diffing prevCherryPicking = gui.State.Modes.CherryPicking + prevRepoPathStack = gui.State.RepoPathStack } modes := Modes{ @@ -371,6 +377,7 @@ func (gui *Gui) resetState() { Ptmx: nil, Modes: modes, ViewContextMap: gui.initialViewContextMap(), + RepoPathStack: prevRepoPathStack, } } |