mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
get rid of these positively ghastly method signatures
This commit is contained in:
@ -26,8 +26,9 @@ func (gui *Gui) runSyncOrAsyncCommand(sub *exec.Cmd, err error) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func (gui *Gui) handleCommitConfirm(g *gocui.Gui, v *gocui.View) error {
|
||||
message := gui.trimmedContent(v)
|
||||
func (gui *Gui) handleCommitConfirm() error {
|
||||
commitMessageView := gui.getCommitMessageView()
|
||||
message := gui.trimmedContent(commitMessageView)
|
||||
if message == "" {
|
||||
return gui.createErrorPanel(gui.Tr.CommitWithoutMessageErr)
|
||||
}
|
||||
@ -44,12 +45,12 @@ func (gui *Gui) handleCommitConfirm(g *gocui.Gui, v *gocui.View) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
gui.clearEditorView(v)
|
||||
gui.clearEditorView(commitMessageView)
|
||||
_ = gui.returnFromContext()
|
||||
return gui.refreshSidePanels(refreshOptions{mode: ASYNC})
|
||||
}
|
||||
|
||||
func (gui *Gui) handleCommitClose(g *gocui.Gui, v *gocui.View) error {
|
||||
func (gui *Gui) handleCommitClose() error {
|
||||
return gui.returnFromContext()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user