notmuch: Allow to use untransformed tag for color 417/head
authorMehdi Abaakouk <sileht@sileht.net>
Mon, 20 Feb 2017 09:05:39 +0000 (10:05 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 20 Feb 2017 17:00:27 +0000 (17:00 +0000)
closes #417

menu.c

diff --git a/menu.c b/menu.c
index 3fd55fae55a55349c2c82fc7535171c247240ca4..67d9dd36304a9bd4a5b3bafb4a8c69ad2e1da363 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -52,6 +52,9 @@ get_color (int index, unsigned char *s)
     case MT_COLOR_INDEX_TAG:
       for (color = ColorIndexTagList; color; color = color->next)
       {
+        if (strncmp((const char *)(s+1), color->pattern,
+                    strlen(color->pattern)) == 0)
+          return color->pair;
         const char * transform = hash_find(TagTransforms, color->pattern);
         if (transform && (strncmp((const char *)(s+1),
             transform, strlen(transform)) == 0))