diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2023-03-23 18:47:29 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2023-04-30 13:19:53 +1000 |
commit | db12853bbe825d69686ea71161497d1bbb120b8e (patch) | |
tree | ebfb066dfef8eb75acdc1ea2bd5f15ff4f4a6507 /pkg/gui/controllers/patch_building_controller.go | |
parent | 711674f6cd68ed3a35e5b0329ff0cf3289fbc7d1 (diff) |
lots of changes
Diffstat (limited to 'pkg/gui/controllers/patch_building_controller.go')
-rw-r--r-- | pkg/gui/controllers/patch_building_controller.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/gui/controllers/patch_building_controller.go b/pkg/gui/controllers/patch_building_controller.go index 2c1728db2..4f2bd44cb 100644 --- a/pkg/gui/controllers/patch_building_controller.go +++ b/pkg/gui/controllers/patch_building_controller.go @@ -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() } |