From 6b7e1f6fd8c92fcd992600b044af8329f1f8a31a Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Wed, 7 Nov 2001 10:21:44 +0000 Subject: [PATCH] patch-1.3.23.1-de-new_threads.2-3 --- commands.c | 4 +++- init.h | 8 ++++++++ mutt.h | 1 + thread.c | 8 +++++--- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/commands.c b/commands.c index 2db40e74..92e55627 100644 --- a/commands.c +++ b/commands.c @@ -539,6 +539,7 @@ void mutt_enter_command (void) int old_sortre = option (OPTSORTRE); int old_hidemissing = option (OPTHIDEMISSING); int old_threadreceived = option (OPTTHREADRECEIVED); + int old_dupthreads = option (OPTDUPTHREADS); buffer[0] = 0; if (mutt_get_field (":", buffer, sizeof (buffer), M_COMMAND) != 0 || !buffer[0]) @@ -561,7 +562,8 @@ void mutt_enter_command (void) if (option (OPTSTRICTTHREADS) != old_strictthreads || option (OPTSORTRE) != old_sortre || option (OPTHIDEMISSING) != old_hidemissing || - option (OPTTHREADRECEIVED) != old_threadreceived) + option (OPTTHREADRECEIVED) != old_threadreceived || + option (OPTDUPTHREADS) != old_dupthreads) set_option (OPTNEEDRESORT); } diff --git a/init.h b/init.h index 228d2757..99673a84 100644 --- a/init.h +++ b/init.h @@ -426,6 +426,14 @@ struct option_t MuttVars[] = { ** .pp ** Example: set dsn_return=hdrs */ + { "duplicate_threads", DT_BOOL, R_NONE, OPTDUPTHREADS, 1 }, + /* + ** .pp + ** This variable controls whether mutt, when sorting by threads, threads + ** messages with the same message-id together. If it is set, it will indicate + ** that it thinks they are duplicates of each other with an equals sign + ** in the thread diagram. + */ { "edit_headers", DT_BOOL, R_NONE, OPTEDITHDRS, 0 }, /* ** .pp diff --git a/mutt.h b/mutt.h index 6c8ac309..8d1929b0 100644 --- a/mutt.h +++ b/mutt.h @@ -317,6 +317,7 @@ enum OPTCONFIRMCREATE, OPTDELETEUNTAG, OPTDIGESTCOLLAPSE, + OPTDUPTHREADS, OPTEDITHDRS, OPTENCODEFROM, OPTENVFROM, diff --git a/thread.c b/thread.c index 21dd9601..3047519b 100644 --- a/thread.c +++ b/thread.c @@ -644,8 +644,10 @@ void mutt_sort_threads (CONTEXT *ctx, int init) if (!cur->thread) { - thread = new = (cur->env->message_id - ? hash_find (ctx->thread_hash, cur->env->message_id) : NULL); + thread = (((!init || option (OPTDUPTHREADS)) && cur->env->message_id) + ? hash_find (ctx->thread_hash, cur->env->message_id) : NULL); + + new = (option (OPTDUPTHREADS) ? thread : NULL); if (thread && !thread->message) { @@ -654,7 +656,7 @@ void mutt_sort_threads (CONTEXT *ctx, int init) cur->thread = thread; thread->check_subject = 1; - /* mark descendants as needing subeject_changed checked */ + /* mark descendants as needing subject_changed checked */ for (tmp = (thread->child ? thread->child : thread); tmp != thread; ) { while (!tmp->message) -- 2.40.0