]> granicus.if.org Git - neomutt/commitdiff
Refresh header color when updating label. (closes #3935)
authorKevin McCarthy <kevin@8t8.us>
Sun, 30 Apr 2017 22:20:56 +0000 (15:20 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sun, 30 Apr 2017 22:20:56 +0000 (15:20 -0700)
color index with a '~y' pattern were not being updated after
adding/removing labels.

headers.c

index 920bae542bbc0239237f419d8536a949f5874d5a..ceef1db10c6032cd2d5e01e88607b3122482d323 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -293,8 +293,13 @@ int mutt_label_message(HEADER *hdr)
     new = NULL;
 
   changed = 0;
-  if (hdr != NULL) {
-    changed += label_message(Context, hdr, new);
+  if (hdr != NULL)
+  {
+    if (label_message(Context, hdr, new))
+    {
+      ++changed;
+      mutt_set_header_color (Context, hdr);
+    }
   } else {
 #define HDR_OF(index) Context->hdrs[Context->v2r[(index)]]
     for (i = 0; i < Context->vcount; ++i) {
@@ -303,6 +308,7 @@ int mutt_label_message(HEADER *hdr)
           ++changed;
           mutt_set_flag(Context, HDR_OF(i),
             MUTT_TAG, 0);
+          /* mutt_set_flag re-evals the header color */
         }
     }
   }