mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Rename OnCommitSuccess to ClearPreservedCommitMessage
In one case it was actually called *before* making a commit (when switching from the commit message panel to committing in the editor). And clearing the preserved message is the only thing it does, so name it after what it does rather than when it's called.
This commit is contained in:
committed by
Stefan Haller
parent
04bacbf9ce
commit
47f1d847f1
@ -157,8 +157,7 @@ func (self *CommitsHelper) OpenCommitMessagePanel(opts *OpenCommitMessagePanelOp
|
||||
self.c.Context().Push(self.c.Contexts().CommitMessage, types.OnFocusOpts{})
|
||||
}
|
||||
|
||||
func (self *CommitsHelper) OnCommitSuccess() {
|
||||
// if we have a preserved message we want to clear it on success
|
||||
func (self *CommitsHelper) ClearPreservedCommitMessage() {
|
||||
self.c.Contexts().CommitMessage.SetPreservedMessageAndLogError("")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user