diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-05-16 20:11:24 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-05-16 21:01:38 +1000 |
commit | 95926866290980855dbefd16b503cb106e1c6171 (patch) | |
tree | 9211747519af3e1c017eebf17685a13bc86e8be8 /pkg/gui | |
parent | 114ad52ff61346bb4c4eaa64f157197ebfb998a5 (diff) |
Compare contexts with keys
We don't want to compare contexts directly given they are interfaces and not
pointers to structs
Diffstat (limited to 'pkg/gui')
-rw-r--r-- | pkg/gui/context.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 |