summaryrefslogtreecommitdiffstats
path: root/curs_main.c
diff options
context:
space:
mode:
authorVincent Lefevre <vincent@vinc17.net>2018-07-22 01:46:03 +0200
committerVincent Lefevre <vincent@vinc17.net>2018-07-22 01:46:03 +0200
commit9a314f02bf65aa46cab29128befb3f67c4f4f0d9 (patch)
tree9240528acce1c8448f6392b65ae07ca18746cf8a /curs_main.c
parentb9eddeabee95e6a93f3731dcdb29e1970dd8895f (diff)
Bug fix: reset ctx->vsize in update_index_unthreaded on reopened mailbox.
This fixes a bug observed when doing the following: 1. Start Mutt on some mailbox. 2. Limit the view. 3. Set sort by date (thus unthreaded). 4. Set $status_format to display the size of the messages shown (%L). 5. Copy a message matching the limit pattern to this mailbox. 6. With another Mutt instance, remove this message from this mailbox. 7. Move the cursor to update the view. Result: one was getting a value equal to twice the initial size.
Diffstat (limited to 'curs_main.c')
-rw-r--r--curs_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/curs_main.c b/curs_main.c
index 1647a386..1b211961 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -437,7 +437,10 @@ static void update_index_unthreaded (CONTEXT *ctx, int check, int oldcount)
for (j = (check == MUTT_REOPENED) ? 0 : oldcount; j < ctx->msgcount; j++)
{
if (!j)
+ {
ctx->vcount = 0;
+ ctx->vsize = 0;
+ }
if (mutt_pattern_exec (ctx->limit_pattern,
MUTT_MATCH_FULL_ADDRESS,