From 95926866290980855dbefd16b503cb106e1c6171 Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Tue, 16 May 2023 20:11:24 +1000 Subject: [PATCH] Compare contexts with keys We don't want to compare contexts directly given they are interfaces and not pointers to structs --- pkg/gui/context.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gui/context.go b/pkg/gui/context.go index d5a7f35a2..7d3b32a1d 100644 --- a/pkg/gui/context.go +++ b/pkg/gui/context.go @@ -95,7 +95,7 @@ func (self *ContextMgr) pushToContextStack(c types.Context) ([]types.Context, ty defer self.Unlock() if len(self.ContextStack) > 0 && - c == self.ContextStack[len(self.ContextStack)-1] { + c.GetKey() == self.ContextStack[len(self.ContextStack)-1].GetKey() { // Context being pushed is already on top of the stack: nothing to // deactivate or activate return contextsToDeactivate, nil