diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1998-06-16 00:22:10 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1998-06-16 00:22:10 +0000 |
commit | 3fbf23455f182c757e22ceca4d438215b5929b26 (patch) | |
tree | 7092d75fb3084b5ddcbb69b05f2b2fef1efec0e0 /pattern.c | |
parent | a07d9f79f6a533ec83d64dda1c824e3a81c2d493 (diff) |
Including Vikas' search code for the "attach message" menu.
Diffstat (limited to 'pattern.c')
-rw-r--r-- | pattern.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -960,7 +960,7 @@ int mutt_pattern_func (int op, char *prompt, HEADER *hdr) return 0; } -int mutt_search_command (int cur, int op) +int mutt_search_command (CONTEXT *ctx, int cur, int op) { int i, j; char buf[STRING]; @@ -1011,8 +1011,8 @@ int mutt_search_command (int cur, int op) if (option (OPTSEARCHINVALID)) { - for (i = 0; i < Context->msgcount; i++) - Context->hdrs[i]->searched = 0; + for (i = 0; i < ctx->msgcount; i++) + ctx->hdrs[i]->searched = 0; unset_option (OPTSEARCHINVALID); } @@ -1020,9 +1020,9 @@ int mutt_search_command (int cur, int op) if (op == OP_SEARCH_OPPOSITE) incr = -incr; - for (i = cur + incr, j = 0 ; j != Context->vcount; j++) + for (i = cur + incr, j = 0 ; j != ctx->vcount; j++) { - if (i > Context->vcount - 1) + if (i > ctx->vcount - 1) { i = 0; if (option (OPTWRAPSEARCH)) @@ -1035,7 +1035,7 @@ int mutt_search_command (int cur, int op) } else if (i < 0) { - i = Context->vcount - 1; + i = ctx->vcount - 1; if (option (OPTWRAPSEARCH)) mutt_message ("Search wrapped to bottom."); else @@ -1045,7 +1045,7 @@ int mutt_search_command (int cur, int op) } } - h = Context->hdrs[Context->v2r[i]]; + h = ctx->hdrs[ctx->v2r[i]]; if (h->searched) { /* if we've already evaulated this message, use the cached value */ @@ -1056,7 +1056,7 @@ int mutt_search_command (int cur, int op) { /* remember that we've already searched this message */ h->searched = 1; - if ((h->matched = (mutt_pattern_exec (SearchPattern, M_MATCH_FULL_ADDRESS, Context, h) > 0))) + if ((h->matched = (mutt_pattern_exec (SearchPattern, M_MATCH_FULL_ADDRESS, ctx, h) > 0))) return i; } |