]> granicus.if.org Git - neomutt/commitdiff
Fix uncollapse_new in pager (#447)
authorMehdi ABAAKOUK <sileht@sileht.net>
Tue, 7 Mar 2017 12:05:15 +0000 (13:05 +0100)
committerRichard Russon <rich@flatcap.org>
Tue, 7 Mar 2017 12:05:15 +0000 (12:05 +0000)
In pager, the index refresher uses the current count as oldcount.

This change fixes that.

Closes #305

pager.c

diff --git a/pager.c b/pager.c
index 5de348bee22ca555f459db5c0e5f2a35b0294f3d..02d8a6398a8d3594bb58bee0e4d9096658111f7b 100644 (file)
--- a/pager.c
+++ b/pager.c
@@ -2059,8 +2059,6 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra)
 
          if (index && Context)
          {
-           oldcount = Context->msgcount;
-           index->max = Context->vcount;
 
            /* After the mailbox has been updated,
             * index->current might be invalid */
@@ -2072,6 +2070,8 @@ mutt_pager (const char *banner, const char *fname, int flags, pager_t *extra)
            update_index (index, Context, check, oldcount, index_hint);
            Context->quiet = q;
 
+           index->max = Context->vcount;
+
            /* If these header pointers don't match, then our email may have
             * been deleted.  Make the pointer safe, then leave the pager */
            if (extra->hdr != Context->hdrs[Context->v2r[index->current]])