diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 15:59:17 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-05 16:09:22 +0800 |
commit | b84666d2a0dc4a7585ef6aa5a8f9060046ff9082 (patch) | |
tree | 5b4486c9e051e62b7b52cc016624e7e9526c8e6e /src/nvim/regexp_bt.c | |
parent | 77e25e56d8ccc0c174305f9fe64ad06f0223ab2d (diff) | |
download | rneovim-b84666d2a0dc4a7585ef6aa5a8f9060046ff9082.tar.gz rneovim-b84666d2a0dc4a7585ef6aa5a8f9060046ff9082.tar.bz2 rneovim-b84666d2a0dc4a7585ef6aa5a8f9060046ff9082.zip |
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)
https://github.com/vim/vim/commit/360da40b47a84ee8586c3b5d062f8c64a2ac9cc6
Co-authored-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/nvim/regexp_bt.c')
-rw-r--r-- | src/nvim/regexp_bt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/regexp_bt.c b/src/nvim/regexp_bt.c index f0efd06cc0..6f63b38a90 100644 --- a/src/nvim/regexp_bt.c +++ b/src/nvim/regexp_bt.c @@ -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; |