1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-06 03:53:59 +02:00

close commit message panel after returning from subprocess

This commit is contained in:
Jesse Duffield 2021-04-08 13:07:54 +10:00
parent a229547048
commit 44f1f22068

View File

@ -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})
}