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>
diff --git a/src/regexp_bt.c b/src/regexp_bt.c
index 198946e..5d9450d 100644
--- a/src/regexp_bt.c
+++ b/src/regexp_bt.c
@@ -1641,7 +1641,7 @@
n = n * 10 + (c - '0');
c = getchr();
}
- if (c == '\'' && n == 0)
+ if (no_Magic(c) == '\'' && n == 0)
{
// "\%'m", "\%<'m" and "\%>'m": Mark
c = getchr();