vim-patch:8.2.4978: no error if engine selection atom is not at the start

Problem:    No error if engine selection atom is not at the start.
Solution:   Give an error. (Christian Brabandt, closes vim/vim#10439)

360da40b47

Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq
2022-11-05 15:59:17 +08:00
parent 77e25e56d8
commit b84666d2a0
5 changed files with 32 additions and 1 deletions

View File

@@ -1971,6 +1971,11 @@ static char_u *regatom(int *flagp)
break;
case '#':
if (regparse[0] == '=' && regparse[1] >= 48 && regparse[1] <= 50) {
// misplaced \%#=1
semsg(_(e_atom_engine_must_be_at_start_of_pattern), regparse[1]);
return FAIL;
}
ret = regnode(CURSOR);
break;