mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-08 22:36:49 +02:00
Reinitialize gui.ShowExtrasWindow after loading user config
This commit is contained in:
@ -395,6 +395,11 @@ func (gui *Gui) onUserConfigLoaded() error {
|
|||||||
gui.previousLanguageConfig = userConfig.Gui.Language
|
gui.previousLanguageConfig = userConfig.Gui.Language
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// originally we could only hide the command log permanently via the config
|
||||||
|
// but now we do it via state. So we need to still support the config for the
|
||||||
|
// sake of backwards compatibility. We're making use of short circuiting here
|
||||||
|
gui.ShowExtrasWindow = userConfig.Gui.ShowCommandLog && !gui.c.GetAppState().HideCommandLog
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -534,10 +539,10 @@ func NewGui(
|
|||||||
RepoStateMap: map[Repo]*GuiRepoState{},
|
RepoStateMap: map[Repo]*GuiRepoState{},
|
||||||
GuiLog: []string{},
|
GuiLog: []string{},
|
||||||
|
|
||||||
// originally we could only hide the command log permanently via the config
|
// initializing this to true for the time being; it will be reset to the
|
||||||
// but now we do it via state. So we need to still support the config for the
|
// real value after loading the user config:
|
||||||
// sake of backwards compatibility. We're making use of short circuiting here
|
ShowExtrasWindow: true,
|
||||||
ShowExtrasWindow: cmn.UserConfig().Gui.ShowCommandLog && !config.GetAppState().HideCommandLog,
|
|
||||||
Mutexes: types.Mutexes{
|
Mutexes: types.Mutexes{
|
||||||
RefreshingFilesMutex: &deadlock.Mutex{},
|
RefreshingFilesMutex: &deadlock.Mutex{},
|
||||||
RefreshingBranchesMutex: &deadlock.Mutex{},
|
RefreshingBranchesMutex: &deadlock.Mutex{},
|
||||||
|
Reference in New Issue
Block a user