summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2017-04-08 14:21:15 -0700
committerKevin McCarthy <kevin@8t8.us>2017-04-08 14:21:15 -0700
commit0b5618c45267b005d0732aac6ee610ca95d30550 (patch)
tree5c0c9dc9cce55c9e88c22bd14a353123fba51e1d /commands.c
parent2ee8b4af9da6d3664eec508acb26be373aae3fb0 (diff)
Ensure mutt stays in endwin during calls to pipe_msg() (closes #3929)
The previous commit solved the problem reported in #3929: progressbar output while downloading a message via IMAP was refreshing the mutt ncurses session after launching the pipe program. To ensure another place in the code doesn't inadvertantly generate output, wrap OPTKEEPQUIET around the calls to pipe_msg()/mutt_wait_filter() too.
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/commands.c b/commands.c
index 58b9c8d0..5e9c46cc 100644
--- a/commands.c
+++ b/commands.c
@@ -406,10 +406,12 @@ static int _mutt_pipe_message (HEADER *h, char *cmd,
mutt_perror _("Can't create filter process");
return 1;
}
-
+
+ set_option (OPTKEEPQUIET);
pipe_msg (h, fpout, decode, print);
safe_fclose (&fpout);
rc = mutt_wait_filter (thepid);
+ unset_option (OPTKEEPQUIET);
}
else
{ /* handle tagged messages */
@@ -440,12 +442,14 @@ static int _mutt_pipe_message (HEADER *h, char *cmd,
mutt_perror _("Can't create filter process");
return 1;
}
+ set_option (OPTKEEPQUIET);
pipe_msg (Context->hdrs[Context->v2r[i]], fpout, decode, print);
/* add the message separator */
if (sep) fputs (sep, fpout);
safe_fclose (&fpout);
if (mutt_wait_filter (thepid) != 0)
rc = 1;
+ unset_option (OPTKEEPQUIET);
}
}
}
@@ -457,6 +461,7 @@ static int _mutt_pipe_message (HEADER *h, char *cmd,
mutt_perror _("Can't create filter process");
return 1;
}
+ set_option (OPTKEEPQUIET);
for (i = 0; i < Context->vcount; i++)
{
if (Context->hdrs[Context->v2r[i]]->tagged)
@@ -470,6 +475,7 @@ static int _mutt_pipe_message (HEADER *h, char *cmd,
safe_fclose (&fpout);
if (mutt_wait_filter (thepid) != 0)
rc = 1;
+ unset_option (OPTKEEPQUIET);
}
}