1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

lots of changes

This commit is contained in:
Jesse Duffield
2023-03-23 18:47:29 +11:00
parent 711674f6cd
commit db12853bbe
63 changed files with 1024 additions and 943 deletions

View File

@ -8,17 +8,17 @@ import (
type PatchBuildingController struct {
baseController
*controllerCommon
c *ControllerCommon
}
var _ types.IController = &PatchBuildingController{}
func NewPatchBuildingController(
common *controllerCommon,
common *ControllerCommon,
) *PatchBuildingController {
return &PatchBuildingController{
baseController: baseController{},
controllerCommon: common,
baseController: baseController{},
c: common,
}
}
@ -64,7 +64,7 @@ func (self *PatchBuildingController) GetOnFocus() func(types.OnFocusOpts) error
// no need to change wrap on the secondary view because it can't be interacted with
self.c.Views().PatchBuilding.Wrap = false
return self.helpers.PatchBuilding.RefreshPatchBuildingPanel(opts)
return self.c.Helpers().PatchBuilding.RefreshPatchBuildingPanel(opts)
}
}
@ -90,7 +90,7 @@ func (self *PatchBuildingController) OpenFile() error {
return nil
}
return self.helpers.Files.OpenFile(path)
return self.c.Helpers().Files.OpenFile(path)
}
func (self *PatchBuildingController) EditFile() error {
@ -104,7 +104,7 @@ func (self *PatchBuildingController) EditFile() error {
}
lineNumber := self.context().GetState().CurrentLineNumber()
return self.helpers.Files.EditFileAtLine(path, lineNumber)
return self.c.Helpers().Files.EditFileAtLine(path, lineNumber)
}
func (self *PatchBuildingController) ToggleSelectionAndRefresh() error {
@ -154,5 +154,5 @@ func (self *PatchBuildingController) toggleSelection() error {
}
func (self *PatchBuildingController) Escape() error {
return self.helpers.PatchBuilding.Escape()
return self.c.Helpers().PatchBuilding.Escape()
}