diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2021-08-25 13:13:47 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2021-08-25 13:13:47 -0700 |
| commit | d7e18968bb92b853ab8eb691e89196e5e2e6f5db (patch) | |
| tree | 635cb41b69fa9a63bc20f4ff9901015531cf8637 | |
| parent | 5eda0d4b881e252937e7ff44fa9876418e7684bb (diff) | |
Bugfix for | not working at start of file
| -rw-r--r-- | match.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -228,7 +228,7 @@ static match_t *match(def_t *defs, file_t *f, const char *str, pat_t *pat, bool return (str == f->end || *str == '\n') ? new_match(defs, pat, str, str, NULL) : NULL; } case BP_WORD_BOUNDARY: { - return (isidcontinue(f, str) != isidcontinue(f, prev_char(f, str))) ? new_match(defs, pat, str, str, NULL) : NULL; + return (str == f->start || isidcontinue(f, str) != isidcontinue(f, prev_char(f, str))) ? new_match(defs, pat, str, str, NULL) : NULL; } case BP_STRING: { if (&str[pat->min_matchlen] > f->end) return NULL; |
