mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
add mutexes for when looping through views
This commit is contained in:
parent
71d4c552af
commit
5d128adee1
|
|
@ -337,6 +337,7 @@ func (gui *Gui) onInitialViewsCreation() error {
|
|||
gui.setInitialViewContexts()
|
||||
|
||||
// add tabs to views
|
||||
gui.g.Mutexes.ViewsMutex.Lock()
|
||||
for _, view := range gui.g.Views() {
|
||||
tabs := gui.viewTabNames(view.Name())
|
||||
if len(tabs) == 0 {
|
||||
|
|
@ -344,6 +345,7 @@ func (gui *Gui) onInitialViewsCreation() error {
|
|||
}
|
||||
view.Tabs = tabs
|
||||
}
|
||||
gui.g.Mutexes.ViewsMutex.Unlock()
|
||||
|
||||
if err := gui.switchContext(gui.defaultSideContext()); err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in a new issue