summaryrefslogtreecommitdiffstats
path: root/pkg/gui/commit_message_panel.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-02 21:30:39 +1100
committerJesse Duffield <jessedduffield@gmail.com>2021-04-06 19:34:32 +1000
commit69e9f6d29da5be2d6250444ee46b05c81d668d8e (patch)
tree9293828c293d715101b6a9e03da11bbf4017be6b /pkg/gui/commit_message_panel.go
parent0b424370524cbc95a5526545f17543a41badcab1 (diff)
use suspense rather than close the gui when switching to a subprocess
Diffstat (limited to 'pkg/gui/commit_message_panel.go')
-rw-r--r--pkg/gui/commit_message_panel.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/pkg/gui/commit_message_panel.go b/pkg/gui/commit_message_panel.go
index 983d02af8..35d3b0c80 100644
--- a/pkg/gui/commit_message_panel.go
+++ b/pkg/gui/commit_message_panel.go
@@ -11,17 +11,13 @@ import (
// runSyncOrAsyncCommand takes the output of a command that may have returned
// either no error, an error, or a subprocess to execute, and if a subprocess
-// needs to be set on the gui object, it does so, and then returns the error
-// the bool returned tells us whether the calling code should continue
+// needs to be run, it runs it
func (gui *Gui) runSyncOrAsyncCommand(sub *exec.Cmd, err error) (bool, error) {
if err != nil {
- if err != gui.Errors.ErrSubProcess {
- return false, gui.surfaceError(err)
- }
+ return false, gui.surfaceError(err)
}
if sub != nil {
- gui.SubProcess = sub
- return false, gui.Errors.ErrSubProcess
+ return false, gui.runSubprocessWithSuspense(sub)
}
return true, nil
}