From: somini Date: Wed, 7 Jun 2017 15:03:17 +0000 (+0100) Subject: Include pattern for broken threads X-Git-Tag: neomutt-20170707~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F623%2Fhead;p=neomutt Include pattern for broken threads References #616 From Frederic Duval: http://cedricduval.free.fr/mutt/patches/download/patch-1.5.1.cd.pattern_broken.1 --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index 2fc7ea337..5114ab30a 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -6573,6 +6573,12 @@ mailboxes $my_mx +mailbox3 $duplicate_threads) + + ~# + broken threads (see + + $strict_threads) + ~$ unreferenced messages (requires threaded view) diff --git a/mutt.h b/mutt.h index 4c6bc984b..d836d0390 100644 --- a/mutt.h +++ b/mutt.h @@ -162,6 +162,7 @@ enum MUTT_DATE_RECEIVED, MUTT_DUPLICATED, MUTT_UNREFERENCED, + MUTT_BROKEN, MUTT_ID, MUTT_BODY, MUTT_HEADER, diff --git a/pattern.c b/pattern.c index a736ed29b..b287b2ac6 100644 --- a/pattern.c +++ b/pattern.c @@ -854,6 +854,7 @@ static const struct PatternFlags { 'z', MUTT_SIZE, 0, eat_range }, { '=', MUTT_DUPLICATED, 0, NULL }, { '$', MUTT_UNREFERENCED, 0, NULL }, + { '#', MUTT_BROKEN, 0, NULL }, { 0, 0, 0, NULL }, }; @@ -1644,6 +1645,8 @@ int mutt_pattern_exec(struct Pattern *pat, pattern_exec_flag flags, } case MUTT_UNREFERENCED: return (pat->not ^ (h->thread && !h->thread->child)); + case MUTT_BROKEN: + return (pat->not ^ (h->thread && h->thread->fake_thread)); #ifdef USE_NNTP case MUTT_NEWSGROUPS: return (pat->not ^ (h->env->newsgroups && patmatch(pat, h->env->newsgroups) == 0));