]> 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>
Sun, 6 Mar 2016 00:44:22 +0000 (00:44 +0000)
don't highlight spoolfile if not coloured

color.c
mutt_curses.h
sidebar.c

diff --git a/color.c b/color.c
index c80c571202debc0ec6661ff62aba8936be7cd10c..1ba4df2dab98a688980aa3c087f8e44383e0b9e4 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 c535c77124f3b865318d074c9d624183892271e6..3f44b9d2126a971bb4991462fa00b2424d8c7ce2 100644 (file)
@@ -130,6 +130,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) {