diff options
author | Abhishek Keshri <iam2kabhishek@gmail.com> | 2023-10-28 23:13:13 +0530 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-03-11 09:18:40 +0100 |
commit | 744519de6016e2d65ca28129e3ad9d6accc76fb8 (patch) | |
tree | d49e119d6a0bdcaaad45ed083ad0e75c929b7c82 /pkg/gui/controllers/commit_description_controller.go | |
parent | b8f4cd0ef67c9d7842cc20fd346c8decdb65be2f (diff) |
Add a commit menu to the commit message panel
And move the "switch to editor" command into this menu. So far this is the only
entry, but we'll add another one in the next commit.
Diffstat (limited to 'pkg/gui/controllers/commit_description_controller.go')
-rw-r--r-- | pkg/gui/controllers/commit_description_controller.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/gui/controllers/commit_description_controller.go b/pkg/gui/controllers/commit_description_controller.go index 8f07cecfc..0c078382b 100644 --- a/pkg/gui/controllers/commit_description_controller.go +++ b/pkg/gui/controllers/commit_description_controller.go @@ -36,8 +36,8 @@ func (self *CommitDescriptionController) GetKeybindings(opts types.KeybindingsOp Handler: self.confirm, }, { - Key: opts.GetKey(opts.Config.CommitMessage.SwitchToEditor), - Handler: self.switchToEditor, + Key: opts.GetKey(opts.Config.CommitMessage.CommitMenu), + Handler: self.openCommitMenu, }, } @@ -64,6 +64,7 @@ func (self *CommitDescriptionController) confirm() error { return self.c.Helpers().Commits.HandleCommitConfirm() } -func (self *CommitDescriptionController) switchToEditor() error { - return self.c.Helpers().Commits.SwitchToEditor() +func (self *CommitDescriptionController) openCommitMenu() error { + authorSuggestion := self.c.Helpers().Suggestions.GetAuthorsSuggestionsFunc() + return self.c.Helpers().Commits.OpenCommitMenu(authorSuggestion) } |