]> granicus.if.org Git - neomutt/commitdiff
Change sidebar_spoolfile coloring to be lower precedence.
authorKevin McCarthy <kevin@8t8.us>
Sat, 3 Dec 2016 23:24:32 +0000 (15:24 -0800)
committerKevin McCarthy <kevin@8t8.us>
Sat, 3 Dec 2016 23:24:32 +0000 (15:24 -0800)
Give sidebar_new and sidebar_flagged higher precedence than
sidebar_spoolfile, so that new and flagged message colors will show up
for the spoolfile in the sidebar.

Thanks to Till Smejkal for the original patch.

sidebar.c

index b8e699314283b250f4bfed87eca0a7219bb44980..2afbbb32eeadf79510cecb0ad63ecbb4426b00b2 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -567,13 +567,13 @@ static void draw_sidebar (int num_rows, int num_cols, int div_width)
     }
     else if (entryidx == HilIndex)
       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) || (b->new))
       SETCOLOR(MT_COLOR_NEW);
     else if (b->msg_flagged > 0)
       SETCOLOR(MT_COLOR_FLAGGED);
+    else if ((ColorDefs[MT_COLOR_SB_SPOOLFILE] != 0) &&
+               (mutt_strcmp (b->path, Spoolfile) == 0))
+      SETCOLOR(MT_COLOR_SB_SPOOLFILE);
     else
       SETCOLOR(MT_COLOR_NORMAL);