forked from aniani/vim
updated for version 7.3.1217
Problem: New regexp engine: Can't handle \%[[ao]]. (Yukihiro Nakadaira) Solution: Support nested atoms inside \%[].
This commit is contained in:
@@ -1150,13 +1150,16 @@ nfa_regatom()
|
||||
int n;
|
||||
|
||||
/* \%[abc] */
|
||||
for (n = 0; (c = getchr()) != ']'; ++n)
|
||||
for (n = 0; (c = peekchr()) != ']'; ++n)
|
||||
{
|
||||
if (c == NUL)
|
||||
EMSG2_RET_FAIL(_(e_missing_sb),
|
||||
reg_magic == MAGIC_ALL);
|
||||
EMIT(c);
|
||||
/* recursive call! */
|
||||
if (nfa_regatom() == FAIL)
|
||||
return FAIL;
|
||||
}
|
||||
getchr(); /* get the ] */
|
||||
if (n == 0)
|
||||
EMSG2_RET_FAIL(_(e_empty_sb),
|
||||
reg_magic == MAGIC_ALL);
|
||||
|
||||
Reference in New Issue
Block a user