]> granicus.if.org Git - neomutt/commitdiff
Include pattern for broken threads 623/head
authorsomini <somini@users.noreply.github.com>
Wed, 7 Jun 2017 15:03:17 +0000 (16:03 +0100)
committerRichard Russon <rich@flatcap.org>
Sat, 24 Jun 2017 10:50:12 +0000 (11:50 +0100)
References #616

From Frederic Duval:
http://cedricduval.free.fr/mutt/patches/download/patch-1.5.1.cd.pattern_broken.1

doc/manual.xml.head
mutt.h
pattern.c

index 2fc7ea3374211c845e175c28a0fb1112f5115f1b..5114ab30ab975bb8e4ee624475ce9264b80ad6a2 100644 (file)
@@ -6573,6 +6573,12 @@ mailboxes $my_mx +mailbox3</screen>
                 <link linkend="duplicate-threads">
                 $duplicate_threads</link>)</entry>
               </row>
+              <row>
+                <entry>~#</entry>
+                <entry>broken threads (see
+                  <link linkend="strict-threads">
+                    $strict_threads</link>)</entry>
+              </row>
               <row>
                 <entry>~$</entry>
                 <entry>unreferenced messages (requires threaded view)</entry>
diff --git a/mutt.h b/mutt.h
index 4c6bc984ba5cd7f523d93f2ff8b9d275a9da6de3..d836d0390ae8586d6b00b1206defdcd2ac4cd614 100644 (file)
--- 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,
index a736ed29b85f69110cf85404033319bae3d1dbdb..b287b2ac6413d749ffc72f9962034cc3604d479d 100644 (file)
--- 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));