patch 8.2.4693: new regexp does not accept pattern "\%>0v"
Problem: new regexp does not accept pattern "\%>0v".
Solution: Do accept digit zero.
diff --git a/src/regexp_bt.c b/src/regexp_bt.c
index 0b3487f..18bad80 100644
--- a/src/regexp_bt.c
+++ b/src/regexp_bt.c
@@ -1617,6 +1617,7 @@
long_u n = 0;
int cmp;
int cur = FALSE;
+ int got_digit = FALSE;
cmp = c;
if (cmp == '<' || cmp == '>')
@@ -1628,6 +1629,7 @@
}
while (VIM_ISDIGIT(c))
{
+ got_digit = TRUE;
n = n * 10 + (c - '0');
c = getchr();
}
@@ -1645,7 +1647,8 @@
}
break;
}
- else if (c == 'l' || c == 'c' || c == 'v')
+ else if ((c == 'l' || c == 'c' || c == 'v')
+ && (cur || got_digit))
{
if (cur && n)
{