]> granicus.if.org Git - neomutt/commitdiff
fix: don't pass colour-codes to filters 618/head
authorRichard Russon <rich@flatcap.org>
Tue, 6 Jun 2017 16:19:06 +0000 (17:19 +0100)
committerRichard Russon <rich@flatcap.org>
Wed, 7 Jun 2017 22:00:21 +0000 (23:00 +0100)
If the index_format string is being passed to an external filter, then
don't embed our secret colour-codes.

Fixes: #221
hdrline.c

index fc6172991dfb0c3796dcb0a2efcc14d6de2a8b26..46034823493b93af1ced7fa3468bf370237a883a 100644 (file)
--- a/hdrline.c
+++ b/hdrline.c
@@ -143,6 +143,10 @@ static size_t add_index_color(char *buf, size_t buflen, format_flag flags, char
   if (!(flags & MUTT_FORMAT_INDEX))
     return 0;
 
+  /* this item is going to be passed to an external filter */
+  if (flags & MUTT_FORMAT_NOFILTER)
+    return 0;
+
   if (color == MT_COLOR_INDEX)
   { /* buf might be uninitialized other cases */
     len = mutt_strlen(buf);