--- mutt.h.orig2 Mon Sep 6 09:24:17 2004 +++ mutt.h Mon Sep 6 09:27:04 2004 @@ -212,6 +212,7 @@ M_LIMIT, M_EXPIRED, M_SUPERSEDED, + M_THREADCOMPLETE, /* actions for mutt_pattern_comp/mutt_pattern_exec */ M_AND, --- pattern.c.orig2 Sun Sep 18 15:17:46 2005 +++ pattern.c Sun Sep 18 15:19:48 2005 @@ -54,6 +54,7 @@ } Flags[] = { + { 'a', M_THREADCOMPLETE, 0, NULL }, { 'A', M_ALL, 0, NULL }, { 'b', M_BODY, M_FULL_MSG, eat_regexp }, { 'B', M_WHOLE_MSG, M_FULL_MSG, eat_regexp }, @@ -1139,6 +1140,16 @@ 2, h->env->to, h->env->cc)); case M_LIST: /* known list, subscribed or not */ return (pat->not ^ mutt_is_list_cc (pat->alladdr, h->env->to, h->env->cc)); + case M_THREADCOMPLETE: + { static pattern_t tmp; + static short pattern_set = 0; + if(! pattern_set) { + memset (&tmp, 0, sizeof (tmp)); + tmp.op = M_TAG; + pattern_set = 1; + } + return (pat->not ^ (h->env && match_threadcomplete(&tmp, flags, ctx, h->thread, 1, 1, 1, 1))); + } case M_SUBSCRIBED_LIST: return (pat->not ^ mutt_is_list_recipient (pat->alladdr, h->env->to, h->env->cc)); case M_PERSONAL_RECIP: