From: Kevin McCarthy Date: Sun, 30 Apr 2017 22:20:56 +0000 (-0700) Subject: Refresh header color when updating label. (closes #3935) X-Git-Tag: mutt-1-8-3-rel~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cca31d794517b118f09eac2800d844aab7a1ee93;p=mutt Refresh header color when updating label. (closes #3935) color index with a '~y' pattern were not being updated after adding/removing labels. --- diff --git a/headers.c b/headers.c index 920bae54..ceef1db1 100644 --- 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 */ } } }