diff options
author | Christian Brabandt <cb@256bit.org> | 2022-05-18 15:04:02 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-18 15:04:02 +0100 |
commit | 360da40b47a84ee8586c3b5d062f8c64a2ac9cc6 (patch) | |
tree | 0be4a080f9ef8f262bf93da97dd512de6cfdea98 /src/regexp_bt.c | |
parent | e2bd8600b873d2cd1f9d667c28cba8b1dba18839 (diff) | |
download | vim-git-360da40b47a84ee8586c3b5d062f8c64a2ac9cc6.tar.gz |
patch 8.2.4978: no error if engine selection atom is not at the startv8.2.4978
Problem: No error if engine selection atom is not at the start.
Solution: Give an error. (Christian Brabandt, closes #10439)
Diffstat (limited to 'src/regexp_bt.c')
-rw-r--r-- | src/regexp_bt.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/regexp_bt.c b/src/regexp_bt.c index 18bad8054..698ff043e 100644 --- a/src/regexp_bt.c +++ b/src/regexp_bt.c @@ -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; |