diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-02 19:20:40 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-06 19:34:32 +1000 |
commit | 798d3e2d54e828f25ed4aadcefff11593fa23e10 (patch) | |
tree | 3b68eedd78e13836da8d7b8c46c5862c458f02a0 /pkg/gui/commit_message_panel.go | |
parent | e8f99c3326f543b713cafb6420a5b9c3c9b4d50c (diff) |
get rid of these positively ghastly method signatures
Diffstat (limited to 'pkg/gui/commit_message_panel.go')
-rw-r--r-- | pkg/gui/commit_message_panel.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/gui/commit_message_panel.go b/pkg/gui/commit_message_panel.go index 1cdd51770..983d02af8 100644 --- a/pkg/gui/commit_message_panel.go +++ b/pkg/gui/commit_message_panel.go @@ -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() } |