From c2e953a09f5b73c5d4bcfaa3c94e660bd1bf7d3a Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 15 Aug 2024 14:40:29 +0200 Subject: [PATCH] Cleanup: use the right context for CommitDescriptionController.Context() It doesn't seem to be used by anything, it looks like we only need to implement the method so that the IController interface is satisfied. But still, it doesn't hurt to be correct here, and might avoid confusion in the future when somebody does try to use the method. --- pkg/gui/controllers/commit_description_controller.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/gui/controllers/commit_description_controller.go b/pkg/gui/controllers/commit_description_controller.go index 50e089fb6..a374c2e3d 100644 --- a/pkg/gui/controllers/commit_description_controller.go +++ b/pkg/gui/controllers/commit_description_controller.go @@ -1,7 +1,6 @@ package controllers import ( - "github.com/jesseduffield/lazygit/pkg/gui/context" "github.com/jesseduffield/lazygit/pkg/gui/types" ) @@ -45,11 +44,7 @@ func (self *CommitDescriptionController) GetKeybindings(opts types.KeybindingsOp } func (self *CommitDescriptionController) Context() types.Context { - return self.context() -} - -func (self *CommitDescriptionController) context() *context.CommitMessageContext { - return self.c.Contexts().CommitMessage + return self.c.Contexts().CommitDescription } func (self *CommitDescriptionController) switchToCommitMessage() error {