changeset: 6892:b112fd7061fb user: David Champion <d...@bikeshed.us> date: Tue Dec 13 12:19:05 2016 -0800 link: http://dev.mutt.org/hg/mutt/rev/b112fd7061fb
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. diffs (50 lines): diff -r 1f04f9145eb1 -r b112fd7061fb curs_main.c --- a/curs_main.c Tue Dec 13 12:02:08 2016 -0800 +++ b/curs_main.c Tue Dec 13 12:19:05 2016 -0800 @@ -390,7 +390,7 @@ } /* 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 @@ 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) { diff -r 1f04f9145eb1 -r b112fd7061fb init.h --- a/init.h Tue Dec 13 12:02:08 2016 -0800 +++ b/init.h Tue Dec 13 12:19:05 2016 -0800 @@ -3639,6 +3639,14 @@ ** 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 diff -r 1f04f9145eb1 -r b112fd7061fb mutt.h --- a/mutt.h Tue Dec 13 12:02:08 2016 -0800 +++ b/mutt.h Tue Dec 13 12:19:05 2016 -0800 @@ -462,6 +462,7 @@ OPTTILDE, OPTTSENABLED, OPTUNCOLLAPSEJUMP, + OPTUNCOLLAPSENEW, OPTUSE8BITMIME, OPTUSEDOMAIN, OPTUSEFROM,