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.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/gui/context.go b/pkg/gui/context.go
index 7d3b32a1d..b55713f27 100644
--- a/pkg/gui/context.go
+++ b/pkg/gui/context.go
@@ -105,7 +105,9 @@ func (self *ContextMgr) pushToContextStack(c types.Context) ([]types.Context, ty
self.ContextStack = append(self.ContextStack, c)
} else if c.GetKind() == types.SIDE_CONTEXT {
// if we are switching to a side context, remove all other contexts in the stack
- contextsToDeactivate = self.ContextStack
+ contextsToDeactivate = lo.Filter(self.ContextStack, func(context types.Context, _ int) bool {
+ return context.GetKey() != c.GetKey()
+ })
self.ContextStack = []types.Context{c}
} else if c.GetKind() == types.MAIN_CONTEXT {
// if we're switching to a main context, remove all other main contexts in the stack