mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Add ContextMgr.NextInStack and use it to access side panel of focused main view
This way we don't have to abuse the parent context mechanism, which isn't meant for this purpose.
This commit is contained in:
@ -131,7 +131,9 @@ func (self *ContextLinesController) currentSidePanel() types.Context {
|
||||
currentContext := self.c.Context().CurrentStatic()
|
||||
if currentContext.GetKey() == context.NORMAL_MAIN_CONTEXT_KEY ||
|
||||
currentContext.GetKey() == context.NORMAL_SECONDARY_CONTEXT_KEY {
|
||||
return currentContext.GetParentContext()
|
||||
if sidePanelContext := self.c.Context().NextInStack(currentContext); sidePanelContext != nil {
|
||||
return sidePanelContext
|
||||
}
|
||||
}
|
||||
|
||||
return currentContext
|
||||
|
Reference in New Issue
Block a user