]> granicus.if.org Git - neomutt/commitdiff
properly update context numbers
authorKarel Zak <kzak@redhat.com>
Thu, 15 Dec 2011 22:21:55 +0000 (23:21 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 15:30:04 +0000 (16:30 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
mutt_notmuch.c

index a736383ce27b251ee44530118bc7120b60cb374a..93222ca6fc005f8d51cd9a3e62660f716aed55fc 100644 (file)
@@ -442,7 +442,10 @@ int nm_read_query(CONTEXT *ctx)
 
                create_hdrdata(h, path, m);
 
-               ctx->size += h->content->length;
+               h->index = ctx->msgcount;
+               ctx->size += h->content->length
+                          + h->content->offset
+                          - h->content->hdr_offset;
                ctx->hdrs[ctx->msgcount] = h;
                ctx->msgcount++;
 
@@ -452,6 +455,7 @@ int nm_read_query(CONTEXT *ctx)
        notmuch_query_destroy(q);
        release_db(ctx);
 
+       mx_update_context(ctx, ctx->msgcount);
        return 0;
 }