]> granicus.if.org Git - neomutt/commitdiff
feature: separate colour for spoolfile
authorRichard Russon <rich@flatcap.org>
Thu, 31 Dec 2015 15:42:25 +0000 (15:42 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 4 Apr 2016 02:37:43 +0000 (03:37 +0100)
don't highlight spoolfile if not coloured

color.c
mutt_curses.h
sidebar.c

diff --git a/color.c b/color.c
index a355bfb95edeffba2e31b96fac8d1c5026dd2b3c..b542ffdd23b95ba4fa9e6fbf1fa1737a2a1f9d98 100644 (file)
--- a/color.c
+++ b/color.c
@@ -100,6 +100,7 @@ static const struct mapping_t Fields[] =
   { "sidebar_highlight",MT_COLOR_HIGHLIGHT },
   { "sidebar_indicator",MT_COLOR_SB_INDICATOR },
   { "sidebar_new",     MT_COLOR_NEW },
+  { "sidebar_spoolfile",MT_COLOR_SB_SPOOLFILE },
 #endif
   { NULL,              0 }
 };
index 5bbae446545c1dec6512443e65033d1709d1092a..fbcbb87dfa9198c2998ed0ee9197c6eb9bc1e515 100644 (file)
@@ -133,6 +133,7 @@ enum
   MT_COLOR_HIGHLIGHT,
   MT_COLOR_NEW,
   MT_COLOR_SB_INDICATOR,
+  MT_COLOR_SB_SPOOLFILE,
 #endif
   MT_COLOR_MAX
 };
index 4d31c9c44135ce528187f6712bd2c7f16dee5ba4..f145373afd28906f6f05e2e3de88ddb3b78d21c5 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -678,6 +678,9 @@ draw_sidebar (int first_row, int num_rows, int div_width)
                        }
                } else if (b == HilBuffy) {
                        SETCOLOR(MT_COLOR_HIGHLIGHT);
+               } else if ((ColorDefs[MT_COLOR_SB_SPOOLFILE] != 0) &&
+                       (mutt_strcmp (b->path, Spoolfile) == 0)) {
+                       SETCOLOR(MT_COLOR_SB_SPOOLFILE);
                } else if (b->msg_unread > 0) {
                        SETCOLOR(MT_COLOR_NEW);
                } else if (b->msg_flagged > 0) {