1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-09 13:47:11 +02:00

Compare contexts with keys

We don't want to compare contexts directly given they are interfaces and not
pointers to structs
This commit is contained in:
Jesse Duffield 2023-05-16 20:11:24 +10:00
parent 114ad52ff6
commit 9592686629

View File

@ -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