1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-12-01 22:52:01 +02:00

Replace CurrentSideContext() with Context().CurrentSide()

This commit is contained in:
Stefan Haller
2024-08-08 10:29:36 +02:00
parent 7f935c1ea8
commit df3afb1b89
8 changed files with 7 additions and 12 deletions

View File

@@ -14,7 +14,7 @@ type FilteringMenuAction struct {
func (self *FilteringMenuAction) Call() error {
fileName := ""
author := ""
switch self.c.CurrentSideContext() {
switch self.c.Context().CurrentSide() {
case self.c.Contexts().Files:
node := self.c.Contexts().Files.GetSelected()
if node != nil {

View File

@@ -70,7 +70,7 @@ func (self *DiffHelper) RenderDiff() error {
// which becomes an option when you bring up the diff menu, but when you're just
// flicking through branches it will be using the local branch name.
func (self *DiffHelper) CurrentDiffTerminals() []string {
c := self.c.CurrentSideContext()
c := self.c.Context().CurrentSide()
if c.GetKey() == "" {
return nil

View File

@@ -89,7 +89,7 @@ func (self *WindowArrangementHelper) GetWindowDimensions(informationStr string,
Height: height,
UserConfig: self.c.UserConfig,
CurrentWindow: self.windowHelper.CurrentWindow(),
CurrentSideWindow: self.c.CurrentSideContext().GetWindowName(),
CurrentSideWindow: self.c.Context().CurrentSide().GetWindowName(),
CurrentStaticWindow: self.c.Context().CurrentStatic().GetWindowName(),
SplitMainPanel: repoState.GetSplitMainPanel(),
ScreenMode: repoState.GetScreenMode(),

View File

@@ -28,5 +28,5 @@ func (self *ToggleWhitespaceAction) Call() error {
self.c.GetAppState().IgnoreWhitespaceInDiffView = !self.c.GetAppState().IgnoreWhitespaceInDiffView
self.c.SaveAppStateAndLogError()
return self.c.CurrentSideContext().HandleFocus(types.OnFocusOpts{})
return self.c.Context().CurrentSide().HandleFocus(types.OnFocusOpts{})
}