summaryrefslogtreecommitdiffstats
path: root/pattern.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-08-27 23:45:40 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-08-27 23:45:40 +0000
commita56c4be859b9138d8f7044aaf5c72bbb7ad821cc (patch)
treeed65f47425bdb620b7ce52c0684a64012805038e /pattern.c
parent31beda39930d293e1331505d138ad5fae7bdbc4f (diff)
[patch-0.94.4.vikas.collapse.2] Vikas' collapse-thread
patch.
Diffstat (limited to 'pattern.c')
-rw-r--r--pattern.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/pattern.c b/pattern.c
index 2b6d857c..53b85d47 100644
--- a/pattern.c
+++ b/pattern.c
@@ -899,12 +899,18 @@ int mutt_pattern_func (int op, char *prompt)
if (op == M_LIMIT)
{
for (i = 0; i < Context->msgcount; i++)
+ {
Context->hdrs[i]->virtual = -1;
+ Context->hdrs[i]->limited = 0;
+ Context->hdrs[i]->collapsed = 0;
+ Context->hdrs[i]->num_hidden = 0;
+ }
Context->vcount = 0;
Context->vsize = 0;
+ Context->collapsed = 0;
}
-#define this_body Context->hdrs[i]->content
+#define THIS_BODY Context->hdrs[i]->content
for (i = 0; i < Context->msgcount; i++)
if (mutt_pattern_exec (pat, M_MATCH_FULL_ADDRESS, Context, Context->hdrs[i]))
@@ -925,19 +931,21 @@ int mutt_pattern_func (int op, char *prompt)
break;
case M_LIMIT:
Context->hdrs[i]->virtual = Context->vcount;
+ Context->hdrs[i]->limited = 1;
Context->v2r[Context->vcount] = i;
Context->vcount++;
- Context->vsize+=this_body->length + this_body->offset -
- this_body->hdr_offset;
+ Context->vsize+=THIS_BODY->length + THIS_BODY->offset -
+ THIS_BODY->hdr_offset;
break;
}
}
-#undef this_body
+#undef THIS_BODY
mutt_clear_error ();
if (op == M_LIMIT)
{
+ Context->collapsed = 0;
safe_free ((void **) &Context->pattern);
if (Context->limit_pattern)
mutt_pattern_free (&Context->limit_pattern);
@@ -948,6 +956,9 @@ int mutt_pattern_func (int op, char *prompt)
for (i = 0; i < Context->msgcount; i++)
{
Context->hdrs[i]->virtual = i;
+ Context->hdrs[i]->limited = 0;
+ Context->hdrs[i]->num_hidden = 0;
+ Context->hdrs[i]->collapsed = 0;
Context->v2r[i] = i;
}