Hi, This was requested on #mutt some time ago and I thought it may be useful to others as well. It doesn't change the default behavour. If it would get included into mutt I would be happy as well ;-)
Thanks,
Simon
Prevents uncollapse of threads when they are viewed.
---
curs_main.c | 4 +++-
init.h | 6 ++++++
mutt.h | 1 +
3 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/curs_main.c b/curs_main.c
index 58d5305..45e5779 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -1191,7 +1191,9 @@ int mutt_index_menu (void)
unset_option (OPTNEEDRESORT);
- if ((Sort & SORT_MASK) == SORT_THREADS && CURHDR->collapsed)
+ /* Uncollapse the thread when viewing it if "uncollapse_view" is set. */
+ if ((Sort & SORT_MASK) == SORT_THREADS && CURHDR->collapsed &&
+ option (OPTUNCOLLAPSEVIEW))
{
mutt_uncollapse_thread (Context, CURHDR);
mutt_set_virtual (Context);
diff --git a/init.h b/init.h
index 2fdb6e6..51f6579 100644
--- a/init.h
+++ b/init.h
@@ -3205,6 +3205,12 @@ 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_view", DT_BOOL, R_NONE, OPTUNCOLLAPSEVIEW, 1 },
+ /*
+ ** .pp
+ ** When \fIset\fP, Mutt will uncollapse a thread when viewing the first
+ ** message of it.
+ */
{ "use_8bitmime", DT_BOOL, R_NONE, OPTUSE8BITMIME, 0 },
/*
** .pp
diff --git a/mutt.h b/mutt.h
index 4d67cab..ea98c9c 100644
--- a/mutt.h
+++ b/mutt.h
@@ -430,6 +430,7 @@ enum
OPTTHREADRECEIVED,
OPTTILDE,
OPTUNCOLLAPSEJUMP,
+ OPTUNCOLLAPSEVIEW,
OPTUSE8BITMIME,
OPTUSEDOMAIN,
OPTUSEFROM,
--
1.7.0.3
--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9
pgpcgiS90VRb8.pgp
Description: PGP signature
