diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-08 13:07:54 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2021-04-08 20:17:16 +1000 |
commit | 44f1f2206823a7a7c9f11e522e50b47238f0a299 (patch) | |
tree | 81fe8a6a3ea1bc5ae4dae69f07f57c991b317a53 /pkg/gui/commit_message_panel.go | |
parent | a229547048b78fb5130fc5252f696dc8e2d59be4 (diff) |
close commit message panel after returning from subprocess
Diffstat (limited to 'pkg/gui/commit_message_panel.go')
-rw-r--r-- | pkg/gui/commit_message_panel.go | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkg/gui/commit_message_panel.go b/pkg/gui/commit_message_panel.go index 7cd6d2ee3..0d6b5b780 100644 --- a/pkg/gui/commit_message_panel.go +++ b/pkg/gui/commit_message_panel.go @@ -16,8 +16,13 @@ func (gui *Gui) runSyncOrAsyncCommand(sub *exec.Cmd, err error) (bool, error) { if err != nil { return false, gui.surfaceError(err) } - if sub != nil { - return false, gui.runSubprocessWithSuspense(sub) + if sub == nil { + return true, nil + } + + err = gui.runSubprocessWithSuspense(sub) + if err != nil { + return false, err } return true, nil } @@ -36,12 +41,14 @@ func (gui *Gui) handleCommitConfirm() error { if err != nil { return err } + + _ = gui.returnFromContext() + if !ok { return nil } gui.clearEditorView(gui.Views.CommitMessage) - _ = gui.returnFromContext() return gui.refreshSidePanels(refreshOptions{mode: ASYNC}) } |