1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-11-29 22:48:24 +02:00

introduce new approach to handling tab states

This commit is contained in:
Jesse Duffield
2020-08-19 09:05:43 +10:00
parent 9a2dc3fe15
commit 2fdadd383a
6 changed files with 91 additions and 29 deletions

View File

@@ -96,8 +96,9 @@ type Gui struct {
// when lazygit is opened outside a git directory we want to open to the most
// recent repo with the recent repos popup showing
showRecentRepos bool
Contexts ContextTree
showRecentRepos bool
Contexts ContextTree
ViewTabContextMap map[string]tabContexts
}
// for now the staging panel state, unlike the other panel states, is going to be
@@ -308,6 +309,7 @@ func NewGui(log *logrus.Entry, gitCommand *commands.GitCommand, oSCommand *comma
gui.resetState()
gui.State.FilterPath = filterPath
gui.Contexts = gui.contextTree()
gui.ViewTabContextMap = gui.viewTabContextMap()
gui.watchFilesForChanges()