Delay selecting the highlighted mailbox until prepare_mailbox(), to
avoid a hidden mailbox being selected during the Buffy list population
(in mutt_sb_notify_mailbox()).
Change update_entries_visibility() to not automatically make the
highlighted mailbox visible.
Change prepare_sidebar() to (re)set the highlighted mailbox when the
current highlighted mailbox is hidden.
continue;
if ((i == OpnIndex) || (sbe->buffy->msg_unread > 0) || sbe->buffy->new ||
- (i == HilIndex) || (sbe->buffy->msg_flagged > 0))
+ (sbe->buffy->msg_flagged > 0))
continue;
if (Context && (mutt_strcmp (sbe->buffy->realpath, Context->realpath) == 0))
HilIndex = i;
}
- if ((HilIndex < 0) || (SidebarSortMethod != PreviousSort))
+ if ((HilIndex < 0) || Entries[HilIndex]->is_hidden ||
+ (SidebarSortMethod != PreviousSort))
{
if (OpnIndex >= 0)
HilIndex = OpnIndex;
if (TopIndex < 0)
TopIndex = EntryCount;
- if (HilIndex < 0)
- HilIndex = EntryCount;
if (BotIndex < 0)
BotIndex = EntryCount;
if ((OpnIndex < 0) && Context &&