diff options
author | Kevin McCarthy <kevin@8t8.us> | 2018-07-25 18:16:34 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2018-07-25 18:21:40 -0700 |
commit | 5f5dc70f41a1510dad47b5d1500781b5fb0b9340 (patch) | |
tree | 4a8d1fe613c3039f78daa49fe62a8dc31e3c1f0d /thread.c | |
parent | 9806d24984eeb09d249d25a8654626c713edb180 (diff) |
Add message padding to ctx->vsize computation.
Use the mx_msg_padding_size() from the previous commit to be more
precise about the correct vsize.
This avoids strange situations where all the message are displayed in
a limit, but the vsize is not equal to the size.
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -22,6 +22,7 @@ #include "mutt.h" #include "sort.h" +#include "mailbox.h" #include <string.h> #include <ctype.h> @@ -1114,11 +1115,12 @@ int mutt_parent_message (CONTEXT *ctx, HEADER *hdr, int find_root) void mutt_set_virtual (CONTEXT *ctx) { - int i; + int i, padding; HEADER *cur; ctx->vcount = 0; ctx->vsize = 0; + padding = mx_msg_padding_size (ctx); for (i = 0; i < ctx->msgcount; i++) { @@ -1128,7 +1130,8 @@ void mutt_set_virtual (CONTEXT *ctx) cur->virtual = ctx->vcount; ctx->v2r[ctx->vcount] = i; ctx->vcount++; - ctx->vsize += cur->content->length + cur->content->offset - cur->content->hdr_offset; + ctx->vsize += cur->content->length + cur->content->offset - + cur->content->hdr_offset + padding; cur->num_hidden = mutt_get_hidden (ctx, cur); } } |