summaryrefslogtreecommitdiffstats
path: root/pkg/gui/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/context.go')
-rw-r--r--pkg/gui/context.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/gui/context.go b/pkg/gui/context.go
index 736f773b7..ec3656720 100644
--- a/pkg/gui/context.go
+++ b/pkg/gui/context.go
@@ -356,8 +356,8 @@ func (tree ContextTree) initialViewTabContextMap() map[string][]tabContext {
}
func (gui *Gui) currentContextKeyIgnoringPopups() ContextKey {
- gui.State.ContextManager.Lock()
- defer gui.State.ContextManager.Unlock()
+ gui.State.ContextManager.RLock()
+ defer gui.State.ContextManager.RUnlock()
stack := gui.State.ContextManager.ContextStack
@@ -577,8 +577,8 @@ func (gui *Gui) activateContext(c Context) error {
// }
func (gui *Gui) currentContext() Context {
- gui.State.ContextManager.Lock()
- defer gui.State.ContextManager.Unlock()
+ gui.State.ContextManager.RLock()
+ defer gui.State.ContextManager.RUnlock()
if len(gui.State.ContextManager.ContextStack) == 0 {
return gui.defaultSideContext()
@@ -599,8 +599,8 @@ func (gui *Gui) currentSideListContext() *ListContext {
}
func (gui *Gui) currentSideContext() Context {
- gui.State.ContextManager.Lock()
- defer gui.State.ContextManager.Unlock()
+ gui.State.ContextManager.RLock()
+ defer gui.State.ContextManager.RUnlock()
stack := gui.State.ContextManager.ContextStack