diff options
author | Kevin McCarthy <kevin@8t8.us> | 2021-08-21 14:55:43 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2021-08-24 09:52:52 -0700 |
commit | b0f54225184adc35ace668393cd29e9a6f6d250c (patch) | |
tree | 32870a3ae8031d0f5019700667b818d582869e27 /imap | |
parent | 647efbd151ee452eaca5f42e4f636a5ed7a32331 (diff) |
Don't include inactive messages in msgset generation.
Currently only deleted messages that will be expunged are marked
inactive, so it shouldn't be an issue. However, before the previous
commit (changing sorting by UID), I think there was a possibility for
a bug if trailing expunge-marked messages with MAXINT index were also
marked inactive.
The sort change fixes that, but to make the code clearer just remove
the possibility of inactive messages being included.
Diffstat (limited to 'imap')
-rw-r--r-- | imap/imap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/imap/imap.c b/imap/imap.c index fe0b4e50..cc25213d 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1212,9 +1212,8 @@ static int imap_make_msg_set (IMAP_DATA* idata, BUFFER* buf, int flag, else if (n == idata->ctx->msgcount-1) mutt_buffer_add_printf (buf, ":%u", HEADER_DATA (hdrs[n])->uid); } - /* 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)) + /* End current set if message doesn't match. */ + else if (setstart) { if (HEADER_DATA (hdrs[n-1])->uid > setstart) mutt_buffer_add_printf (buf, ":%u", HEADER_DATA (hdrs[n-1])->uid); |