From 63395c76ab0f77be83f0774109aaddf9d2d42759 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 15 Dec 2011 23:21:55 +0100 Subject: [PATCH] properly update context numbers Signed-off-by: Karel Zak --- mutt_notmuch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mutt_notmuch.c b/mutt_notmuch.c index a736383ce..93222ca6f 100644 --- a/mutt_notmuch.c +++ b/mutt_notmuch.c @@ -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; } -- 2.50.1