]> granicus.if.org Git - mutt/commitdiff
Add a ~= pattern. From Frederic Duval.
authorThomas Roessler <roessler@does-not-exist.org>
Sat, 12 Jan 2002 11:39:47 +0000 (11:39 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Sat, 12 Jan 2002 11:39:47 +0000 (11:39 +0000)
doc/manual.sgml.head
doc/muttrc.man.head
mutt.h
pattern.c

index 575318f0acbd2656ab579038a39f8a1b9de6c142..f05d11b441dd6b13863a9331625ab5f696a9d532 100644 (file)
@@ -1718,6 +1718,7 @@ messages:
 ~x EXPR         messages which contain EXPR in the `References' field
 ~y EXPR         messages which contain EXPR in the `X-Label' field
 ~z [MIN]-[MAX]  messages with a size in the range MIN to MAX *)
+~=             duplicated messages (see $duplicate_threads)
 </verb></tscreen>
 
 Where EXPR, USER, ID, and SUBJECT are 
index ed59a64307c39a6545da489d9478f5341b1f42e7..176f30dd95ac80fb1cf5449c04d8d0b2f97e47a6 100644 (file)
@@ -368,6 +368,7 @@ l l.
 ~v     message is part of a collapsed thread.
 ~x \fIEXPR\fP  messages which contain \fIEXPR\fP in the \(lqReferences\(rq field
 ~z \fIMIN\fP-\fIMAX\fP messages with a size in the range \fIMIN\fP to \fIMAX\fP
+~=     duplicated messages (see $duplicate_threads)
 .TE
 .PP
 In the above, \fIEXPR\fP is a regular expression.
diff --git a/mutt.h b/mutt.h
index 4e642891b62653f4cbdef511ad552e085e7bc71f..9e48aca7083e9db6a7d51a2adb6a334f76653fe7 100644 (file)
--- a/mutt.h
+++ b/mutt.h
@@ -201,6 +201,7 @@ enum
   M_FROM,
   M_DATE,
   M_DATE_RECEIVED,
+  M_DUPLICATED,
   M_ID,
   M_BODY,
   M_HEADER,
index 213ae57c38ca74a3c781846f732c3477b3af9caf..e468915649d1869a4f230dd81f8cc2c5873d2dc2 100644 (file)
--- a/pattern.c
+++ b/pattern.c
@@ -90,6 +90,7 @@ Flags[] =
   { 'x', M_REFERENCE,          0,              eat_regexp },
   { 'y', M_XLABEL,             0,              eat_regexp },
   { 'z', M_SIZE,               0,              eat_range },
+  { '=', M_DUPLICATED,         0,              NULL },
   { 0 }
 };
 
@@ -1050,6 +1051,8 @@ mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx,
 #endif
     case M_XLABEL:
       return (pat->not ^ (h->env->x_label && regexec (pat->rx, h->env->x_label, 0, NULL, 0) == 0));
+    case M_DUPLICATED:
+      return (pat->not ^ (h->thread && h->thread->duplicate_thread));
   }
   mutt_error (_("error: unknown op %d (report this error)."), pat->op);
   return (-1);