mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:7.4.437
Problem: New and old regexp engine are not consistent. Solution: Also give an error for "\ze*" for the old regexp engine. https://code.google.com/p/vim/source/detail?r=v7-4-437
This commit is contained in:
parent
44635add18
commit
ca7c509ae0
@ -1983,9 +1983,15 @@ static char_u *regatom(int *flagp)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 's': ret = regnode(MOPEN + 0);
|
case 's': ret = regnode(MOPEN + 0);
|
||||||
|
if (!re_mult_next("\\zs")) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'e': ret = regnode(MCLOSE + 0);
|
case 'e': ret = regnode(MCLOSE + 0);
|
||||||
|
if (!re_mult_next("\\ze")) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: EMSG_RET_NULL(_("E68: Invalid character after \\z"));
|
default: EMSG_RET_NULL(_("E68: Invalid character after \\z"));
|
||||||
@ -2460,6 +2466,15 @@ do_multibyte:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Used in a place where no * or \+ can follow.
|
||||||
|
static bool re_mult_next(char *what)
|
||||||
|
{
|
||||||
|
if (re_multi_type(peekchr()) == MULTI_MULT) {
|
||||||
|
EMSG2_RET_FAIL(_("E888: (NFA regexp) cannot repeat %s"), what);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Return TRUE if MULTIBYTECODE should be used instead of EXACTLY for
|
* Return TRUE if MULTIBYTECODE should be used instead of EXACTLY for
|
||||||
* character "c".
|
* character "c".
|
||||||
|
@ -1747,15 +1747,6 @@ nfa_do_multibyte:
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Used in a place where no * or \+ can follow.
|
|
||||||
static bool re_mult_next(char *what)
|
|
||||||
{
|
|
||||||
if (re_multi_type(peekchr()) == MULTI_MULT) {
|
|
||||||
EMSG2_RET_FAIL(_("E888: (NFA regexp) cannot repeat %s"), what);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse something followed by possible [*+=].
|
* Parse something followed by possible [*+=].
|
||||||
*
|
*
|
||||||
|
@ -228,7 +228,7 @@ static int included_patches[] = {
|
|||||||
440,
|
440,
|
||||||
439,
|
439,
|
||||||
//438,
|
//438,
|
||||||
//437,
|
437,
|
||||||
436,
|
436,
|
||||||
//435,
|
//435,
|
||||||
//434,
|
//434,
|
||||||
|
Loading…
Reference in New Issue
Block a user