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

Replace CurrentStaticContext() with Context().CurrentStatic()

This commit is contained in:
Stefan Haller
2024-08-08 10:28:34 +02:00
parent 7ed94c0410
commit 7f935c1ea8
9 changed files with 10 additions and 15 deletions

View File

@@ -41,7 +41,7 @@ func (self *PatchBuildingHelper) Escape() error {
func (self *PatchBuildingHelper) Reset() error {
self.c.Git().Patch.PatchBuilder.Reset()
if self.c.CurrentStaticContext().GetKind() != types.SIDE_CONTEXT {
if self.c.Context().CurrentStatic().GetKind() != types.SIDE_CONTEXT {
if err := self.Escape(); err != nil {
return err
}

View File

@@ -114,9 +114,9 @@ func (self *StagingHelper) handleStagingEscape() error {
}
func (self *StagingHelper) secondaryStagingFocused() bool {
return self.c.CurrentStaticContext().GetKey() == self.c.Contexts().StagingSecondary.GetKey()
return self.c.Context().CurrentStatic().GetKey() == self.c.Contexts().StagingSecondary.GetKey()
}
func (self *StagingHelper) mainStagingFocused() bool {
return self.c.CurrentStaticContext().GetKey() == self.c.Contexts().Staging.GetKey()
return self.c.Context().CurrentStatic().GetKey() == self.c.Contexts().Staging.GetKey()
}

View File

@@ -90,7 +90,7 @@ func (self *WindowArrangementHelper) GetWindowDimensions(informationStr string,
UserConfig: self.c.UserConfig,
CurrentWindow: self.windowHelper.CurrentWindow(),
CurrentSideWindow: self.c.CurrentSideContext().GetWindowName(),
CurrentStaticWindow: self.c.CurrentStaticContext().GetWindowName(),
CurrentStaticWindow: self.c.Context().CurrentStatic().GetWindowName(),
SplitMainPanel: repoState.GetSplitMainPanel(),
ScreenMode: repoState.GetScreenMode(),
AppStatus: appStatus,