diff --git a/pkg/gui/controllers/helpers/patch_building_helper.go b/pkg/gui/controllers/helpers/patch_building_helper.go index 63744167f..ee1335deb 100644 --- a/pkg/gui/controllers/helpers/patch_building_helper.go +++ b/pkg/gui/controllers/helpers/patch_building_helper.go @@ -91,7 +91,7 @@ func (self *PatchBuildingHelper) RefreshPatchBuildingPanel(opts types.OnFocusOpt oldState := context.GetState() - state := patch_exploring.NewState(diff, selectedLineIdx, oldState, self.c.Log) + state := patch_exploring.NewState(diff, selectedLineIdx, oldState) context.SetState(state) if state == nil { self.Escape() diff --git a/pkg/gui/controllers/helpers/staging_helper.go b/pkg/gui/controllers/helpers/staging_helper.go index a6b870517..5fb4f49d5 100644 --- a/pkg/gui/controllers/helpers/staging_helper.go +++ b/pkg/gui/controllers/helpers/staging_helper.go @@ -63,11 +63,11 @@ func (self *StagingHelper) RefreshStagingPanel(focusOpts types.OnFocusOpts) { secondaryContext.GetMutex().Lock() mainContext.SetState( - patch_exploring.NewState(mainDiff, mainSelectedLineIdx, mainContext.GetState(), self.c.Log), + patch_exploring.NewState(mainDiff, mainSelectedLineIdx, mainContext.GetState()), ) secondaryContext.SetState( - patch_exploring.NewState(secondaryDiff, secondarySelectedLineIdx, secondaryContext.GetState(), self.c.Log), + patch_exploring.NewState(secondaryDiff, secondarySelectedLineIdx, secondaryContext.GetState()), ) mainState := mainContext.GetState() diff --git a/pkg/gui/patch_exploring/state.go b/pkg/gui/patch_exploring/state.go index 1898a032d..ec5da41d1 100644 --- a/pkg/gui/patch_exploring/state.go +++ b/pkg/gui/patch_exploring/state.go @@ -3,7 +3,6 @@ package patch_exploring import ( "github.com/jesseduffield/generics/set" "github.com/jesseduffield/lazygit/pkg/commands/patch" - "github.com/sirupsen/logrus" ) // State represents the current state of the patch explorer context i.e. when @@ -29,7 +28,7 @@ const ( HUNK ) -func NewState(diff string, selectedLineIdx int, oldState *State, log *logrus.Entry) *State { +func NewState(diff string, selectedLineIdx int, oldState *State) *State { if oldState != nil && diff == oldState.diff && selectedLineIdx == -1 { // if we're here then we can return the old state. If selectedLineIdx was not -1 // then that would mean we were trying to click and potentiall drag a range, which