diff options
-rw-r--r-- | commands/compose/send.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/commands/compose/send.go b/commands/compose/send.go index 574e872..dd3a8d3 100644 --- a/commands/compose/send.go +++ b/commands/compose/send.go @@ -15,6 +15,7 @@ import ( "github.com/google/shlex" "github.com/pkg/errors" + "git.sr.ht/~rjarry/aerc/commands/mode" "git.sr.ht/~rjarry/aerc/lib" "git.sr.ht/~rjarry/aerc/logging" "git.sr.ht/~rjarry/aerc/models" @@ -96,6 +97,9 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error { aerc.RemoveTab(composer) aerc.PushStatus("Sending...", 10*time.Second) + // enter no-quit mode + mode.NoQuit() + var copyBuf bytes.Buffer // for the Sent folder content if CopyTo is set failCh := make(chan error) @@ -136,6 +140,9 @@ func (Send) Execute(aerc *widgets.Aerc, args []string) error { go func() { defer logging.PanicHandler() + // leave no-quit mode + defer mode.NoQuitDone() + err = <-failCh if err != nil { aerc.PushError(strings.ReplaceAll(err.Error(), "\n", " ")) |