1 Don't draw imap fetch progress if we aren't in visual mode.
2 Drawing progress leaves terminal in confusing state when piping a message
3 from pager to less(1). See http://bugs.mutt.org/1771
9 @@ -392,7 +392,7 @@ int imap_fetch_message (MESSAGE *msg, CO
10 char path[_POSIX_PATH_MAX];
13 - progress_t progressbar;
14 + progress_t progressbar, *pbar;
18 @@ -489,9 +489,15 @@ int imap_fetch_message (MESSAGE *msg, CO
19 imap_error ("imap_fetch_message()", buf);
22 - mutt_progress_init (&progressbar, _("Fetching message..."),
23 - M_PROGRESS_SIZE, NetInc, bytes);
24 - if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
27 + mutt_progress_init (&progressbar, _("Fetching message..."),
28 + M_PROGRESS_SIZE, NetInc, bytes);
29 + pbar = &progressbar;
33 + if (imap_read_literal (msg->fp, idata, bytes, pbar) < 0)
35 /* pick up trailing line */
36 if ((rc = imap_cmd_step (idata)) != IMAP_CMD_CONTINUE)