From: Brendan Cully Date: Tue, 13 May 2008 06:15:07 +0000 (-0700) Subject: Terminate open IMAP message sets at end of mailbox even if the last message is inactive. X-Git-Tag: mutt-1-5-18-rel~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ecdf304b22c3bf1195dc4104d397ec508d2da17f;p=mutt Terminate open IMAP message sets at end of mailbox even if the last message is inactive. Closes #3002. --- diff --git a/ChangeLog b/ChangeLog index 37651678..69198c45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2008-05-11 10:52 +0200 Matthias Andree (09b0363cdf54) + + * rfc3676.c: In debug output, cast size_t arguments to long for + consistency with printf %ld argument. + +2008-05-11 00:50 -0700 Brendan Cully (98c39c5187a9) + + * main.c: Update copyright in -vv output. Closes #3042. + +2008-05-07 11:54 -0700 Brendan Cully (385efdbf9423) + + * mutt_sasl.c, mutt_sasl.h: Make SASL support conn_poll method. + Make SASL IP lookup failure non-fatal. Both are for tunnel support. + 2008-05-05 19:32 +0200 Rocco Rutte (0eacf5297484) * mbyte.c, mbyte.h: Fix some compiler warnings if compiling without diff --git a/imap/imap.c b/imap/imap.c index 1a278dc1..fec20298 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -860,7 +860,6 @@ int imap_has_flag (LIST* flag_list, const char* flag) * headers, given a flag enum to filter on. * Params: idata: IMAP_DATA containing context containing header set * buf: to write message set into - * buflen: length of buffer * flag: enum of flag type on which to filter * changed: include only changed messages in message set * invert: invert sense of flag, eg M_READ matches unread messages @@ -942,8 +941,9 @@ int imap_make_msg_set (IMAP_DATA* idata, BUFFER* buf, int flag, int changed, else if (n == idata->ctx->msgcount-1) mutt_buffer_printf (buf, ":%u", HEADER_DATA (hdrs[n])->uid); } - /* this message is not expunged and doesn't match. End current set. */ - else if (setstart && hdrs[n]->active) + /* End current set if message doesn't match or we've reached the end + * of the mailbox via inactive messages following the last match. */ + else if (setstart && (hdrs[n]->active || n == idata->ctx->msgcount-1)) { if (HEADER_DATA (hdrs[n-1])->uid > setstart) mutt_buffer_printf (buf, ":%u", HEADER_DATA (hdrs[n-1])->uid);