Change sidebar next/prev-new to look at buffy->new too.
authorKevin McCarthy <kevin@8t8.us>
Wed, 22 Jun 2016 16:20:39 +0000 (09:20 -0700)
committerKevin McCarthy <kevin@8t8.us>
Wed, 22 Jun 2016 16:20:39 +0000 (09:20 -0700)
Look at new in addition to msg_unread count, to account for when
$mail_check_stats is unset or when the sidebar only shows the %n
status flag.

sidebar.c

index e363063a9a5895cd9afdae38175a60dda1c5ae26..95a908008363fc2bd45d6fb57287f069311a2c2f 100644 (file)
--- a/sidebar.c
+++ b/sidebar.c
@@ -73,7 +73,7 @@ static BUFFY *find_next_new (int wrap)
       b = Incoming;
     if (!b || (b == HilBuffy))
       break;
-    if (b->msg_unread > 0)
+    if (b->new || b->msg_unread > 0)
       return b;
   } while (b);
 
@@ -103,7 +103,7 @@ static BUFFY *find_prev_new (int wrap)
       b = Outgoing;
     if (!b || (b == HilBuffy))
       break;
-    if (b->msg_unread > 0)
+    if (b->new || b->msg_unread > 0)
       return b;
   } while (b);
 
@@ -403,7 +403,7 @@ static void update_buffy_visibility (BUFFY **arr, int arr_len)
     if (!new_only)
       continue;
 
-    if ((b == OpnBuffy) || (b->msg_unread  > 0) ||
+    if ((b == OpnBuffy) || (b->msg_unread  > 0) || b->new ||
         (b == HilBuffy) || (b->msg_flagged > 0))
       continue;