0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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 #10439)
This commit is contained in:
Christian Brabandt
2022-05-18 15:04:02 +01:00
committed by Bram Moolenaar
parent e2bd8600b8
commit 360da40b47
6 changed files with 39 additions and 1 deletions

View File

@@ -1503,6 +1503,14 @@ 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;