diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-01 07:03:03 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-02 08:09:42 +1000 |
commit | 5d128adee14991c7426c59fef04d8aad711f07d8 (patch) | |
tree | ba4bd2b34c13c58948aa280bdbbfc930b09d8f56 /pkg/gui | |
parent | 71d4c552aff78fc4095a3fd03b1e250511fbb13f (diff) |
add mutexes for when looping through views
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/layout.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/gui/layout.go b/pkg/gui/layout.go index e27a46457..e3befd819 100644 --- a/pkg/gui/layout.go +++ b/pkg/gui/layout.go @@ -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 |