0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 8.2.4693: new regexp does not accept pattern "\%>0v"

Problem:    new regexp does not accept pattern "\%>0v".
Solution:   Do accept digit zero.
This commit is contained in:
Bram Moolenaar
2022-04-05 14:00:32 +01:00
parent 0f68e6c07a
commit 72bb10df1f
4 changed files with 23 additions and 3 deletions

View File

@@ -1617,6 +1617,7 @@ regatom(int *flagp)
long_u n = 0;
int cmp;
int cur = FALSE;
int got_digit = FALSE;
cmp = c;
if (cmp == '<' || cmp == '>')
@@ -1628,6 +1629,7 @@ regatom(int *flagp)
}
while (VIM_ISDIGIT(c))
{
got_digit = TRUE;
n = n * 10 + (c - '0');
c = getchr();
}
@@ -1645,7 +1647,8 @@ regatom(int *flagp)
}
break;
}
else if (c == 'l' || c == 'c' || c == 'v')
else if ((c == 'l' || c == 'c' || c == 'v')
&& (cur || got_digit))
{
if (cur && n)
{