0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 9.0.1777: patch 9.0.1771 causes problems

Problem:  patch 9.0.1771 causes problems
Solution: revert it

Revert "patch 9.0.1771: regex: combining chars in collections not handled"
This reverts commit ca22fc36a4.

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Christian Brabandt
2023-08-20 22:26:15 +02:00
parent 6d626c4184
commit be07caa071
4 changed files with 10 additions and 146 deletions

View File

@@ -3743,38 +3743,13 @@ regmatch(
case ANYOF:
case ANYBUT:
{
char_u *q = OPERAND(scan);
if (c == NUL)
status = RA_NOMATCH;
else if ((cstrchr(q, c) == NULL) == (op == ANYOF))
status = RA_NOMATCH;
else
{
// Check following combining characters
int len = 0;
int i;
if (enc_utf8)
len = utfc_ptr2len(q) - utf_ptr2len(q);
MB_CPTR_ADV(rex.input);
MB_CPTR_ADV(q);
if (!enc_utf8 || len == 0)
break;
for (i = 0; i < len; ++i)
if (q[i] != rex.input[i])
{
status = RA_NOMATCH;
break;
}
rex.input += len;
}
break;
}
if (c == NUL)
status = RA_NOMATCH;
else if ((cstrchr(OPERAND(scan), c) == NULL) == (op == ANYOF))
status = RA_NOMATCH;
else
ADVANCE_REGINPUT();
break;
case MULTIBYTECODE:
if (has_mbyte)