aboutsummaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-20 15:23:57 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-20 15:23:57 -0800
commitb4c8a33a0cbf4938b53458ded4d46efc6e8820ab (patch)
treeb5823b03aa1d6ab8dc5dc92cd543ca77c1c0b3c2 /match.c
parent3c38aef78c637f933da7111bc55b77d94a824afa (diff)
Tweaked `..` syntax to make it more flexible (now: `.. % skip pat`)
Diffstat (limited to 'match.c')
-rw-r--r--match.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/match.c b/match.c
index 05d8a8a..e89abd4 100644
--- a/match.c
+++ b/match.c
@@ -207,7 +207,7 @@ static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, bool
m->end = str;
return m;
}
- case BP_UPTO_AND: {
+ case BP_UPTO: {
match_t *m = new_match();
m->start = str;
m->pat = pat;
@@ -225,8 +225,8 @@ static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, bool
if (target) {
match_t *p = match(defs, f, str, target, ignorecase);
if (p != NULL) {
- ADD_OWNER(*dest, p);
- m->end = p->end;
+ recycle_if_unused(&p);
+ m->end = str;
return m;
}
} else if (str == f->end) {