patch 9.1.0217: regexp: verymagic cannot match before/after a mark

Problem:  regexp: verymagic cannot match before/after a mark
Solution: Correctly check for the very magic check (Julio B)

Fix regexp parser for \v%>'m and \v%<'m
Currently \v%'m works fine, but it is unable to match before or after
the position of mark m.

closes: #14309

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Julio B
2024-03-28 10:23:37 +01:00
committed by Christian Brabandt
parent 74a2331846
commit 46fa3c7e27
3 changed files with 16 additions and 2 deletions

View File

@ -1733,7 +1733,7 @@ nfa_regatom(void)
EMIT((int)n);
break;
}
else if (c == '\'' && n == 0)
else if (no_Magic(c) == '\'' && n == 0)
{
// \%'m \%<'m \%>'m
EMIT(cmp == '<' ? NFA_MARK_LT :