mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
add mutexes for when looping through views
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user