diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-08-06 09:26:46 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-08-06 12:08:14 +0200 |
commit | 9ce586146825200c819662ea8dcb44cc03d2cd53 (patch) | |
tree | ca9e9db902574de4da0eb2155d9020b73c695699 /src/event.c | |
parent | bfe73d0e5d66c43006a8a0dd8d58e311432bcb57 (diff) | |
download | calcurse-9ce586146825200c819662ea8dcb44cc03d2cd53.zip |
Add pattern filter option
This adds a new item filter option --filter-pattern and removes the
whole -S parameter logic, while making -S an alias for --filter-pattern.
Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src/event.c')
-rw-r--r-- | src/event.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/event.c b/src/event.c index 96ac41d..1bf3b29 100644 --- a/src/event.c +++ b/src/event.c @@ -152,6 +152,8 @@ struct event *event_scan(FILE * f, struct tm start, int id, char *note, if (filter) { if (!(filter->type_mask & TYPE_MASK_EVNT)) return NULL; + if (filter->regex && regexec(filter->regex, buf, 0, 0, 0)) + return NULL; if (filter->start_from >= 0 && tstart < filter->start_from) return NULL; if (filter->start_to >= 0 && tstart > filter->start_to) |