]> granicus.if.org Git - mutt/commitdiff
Terminate open IMAP message sets at end of mailbox even if the last message is inactive.
authorBrendan Cully <brendan@kublai.com>
Tue, 13 May 2008 06:15:07 +0000 (23:15 -0700)
committerBrendan Cully <brendan@kublai.com>
Tue, 13 May 2008 06:15:07 +0000 (23:15 -0700)
Closes #3002.

ChangeLog
imap/imap.c

index 3765167883b76cf0a8e54f50884a837c938c993f..69198c45bd9fa15a2aa639509d916e67eb4f3a1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2008-05-11 10:52 +0200  Matthias Andree  <matthias.andree@gmx.de>  (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  <brendan@kublai.com>  (98c39c5187a9)
+
+       * main.c: Update copyright in -vv output. Closes #3042.
+
+2008-05-07 11:54 -0700  Brendan Cully  <brendan@kublai.com>  (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  <pdmef@gmx.net>  (0eacf5297484)
 
        * mbyte.c, mbyte.h: Fix some compiler warnings if compiling without
index 1a278dc10f92d2819065777cf84a34142c6bc0ae..fec202987e2b2cefb3016f062ba102be0e8187b4 100644 (file)
@@ -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);