Commit f74224de authored by David Champion's avatar David Champion

Add option to control whether threads uncollapse when new mail arrives.

Adds $uncollapse_new: when set, the default, a collapsed thread into
which a new message arrives will be uncollapsed to reveal the new
message.
parent fb9a279f
......@@ -390,7 +390,7 @@ static void update_index (MUTTMENU *menu, CONTEXT *ctx, int check,
}
/* save the list of new messages */
if (oldcount && check != MUTT_REOPENED
if (option(OPTUNCOLLAPSENEW) && oldcount && check != MUTT_REOPENED
&& ((Sort & SORT_MASK) == SORT_THREADS))
{
save_new = (HEADER **) safe_malloc (sizeof (HEADER *) * (ctx->msgcount - oldcount));
......@@ -402,7 +402,7 @@ static void update_index (MUTTMENU *menu, CONTEXT *ctx, int check,
mutt_sort_headers (ctx, (check == MUTT_REOPENED));
/* uncollapse threads with new mail */
if ((Sort & SORT_MASK) == SORT_THREADS)
if (option(OPTUNCOLLAPSENEW) && ((Sort & SORT_MASK) == SORT_THREADS))
{
if (check == MUTT_REOPENED)
{
......
......@@ -3639,6 +3639,14 @@ struct option_t MuttVars[] = {
** When \fIset\fP, Mutt will jump to the next unread message, if any,
** when the current thread is \fIun\fPcollapsed.
*/
{ "uncollapse_new", DT_BOOL, R_NONE, OPTUNCOLLAPSENEW, 1 },
/*
** .pp
** When \fIset\fP, Mutt will automatically uncollapse any collapsed thread
** that receives a new message. When \fIunset\fP, collapsed threads will
** remain collapsed. the presence of the new message will still affect
** index sorting, though.
*/
{ "use_8bitmime", DT_BOOL, R_NONE, OPTUSE8BITMIME, 0 },
/*
** .pp
......
......@@ -462,6 +462,7 @@ enum
OPTTILDE,
OPTTSENABLED,
OPTUNCOLLAPSEJUMP,
OPTUNCOLLAPSENEW,
OPTUSE8BITMIME,
OPTUSEDOMAIN,
OPTUSEFROM,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment