From: Alain Bench Date: Tue, 4 Oct 2005 04:29:09 +0000 (+0000) Subject: Piping and printing in IMAP folder index with imap_peek=no marks message X-Git-Tag: mutt-1-5-12-rel~313 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6104ba5c2f5245d282c126d5120878b25bf963b0;p=mutt Piping and printing in IMAP folder index with imap_peek=no marks message read immediatly. --- diff --git a/curs_main.c b/curs_main.c index 24ef28cb..71cf6063 100644 --- a/curs_main.c +++ b/curs_main.c @@ -1996,27 +1996,49 @@ CHECK_IMAP_ACL(IMAP_ACL_INSERT); continue; } break; - + case OP_PIPE: CHECK_MSGCOUNT; - CHECK_VISIBLE; + CHECK_VISIBLE; mutt_pipe_message (tag ? NULL : CURHDR); + +#ifdef USE_IMAP + /* in an IMAP folder index with imap_peek=no, piping could change + * new or old messages status to read. Redraw what's needed. + */ + if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) + { + menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; + } +#endif + MAYBE_REDRAW (menu->redraw); break; case OP_PRINT: CHECK_MSGCOUNT; - CHECK_VISIBLE; + CHECK_VISIBLE; mutt_print_message (tag ? NULL : CURHDR); + +#ifdef USE_IMAP + /* in an IMAP folder index with imap_peek=no, printing could change + * new or old messages status to read. Redraw what's needed. + */ + if (Context->magic == M_IMAP && !option (OPTIMAPPEEK)) + { + menu->redraw = (tag ? REDRAW_INDEX : REDRAW_CURRENT) | REDRAW_STATUS; + } +#endif + break; case OP_MAIN_READ_THREAD: case OP_MAIN_READ_SUBTHREAD: CHECK_MSGCOUNT; - CHECK_VISIBLE; + CHECK_VISIBLE; CHECK_READONLY; #ifdef USE_IMAP