1
0
forked from aniani/vim

patch 8.2.4515: old subsitute syntax is still supported

Problem:    Old subsitute syntax is still supported.
Solution:   Disallow using backslash after ":s" in Vim9 script.
This commit is contained in:
Bram Moolenaar
2022-03-05 21:13:26 +00:00
parent b2175220da
commit 9fb7b42935
4 changed files with 13 additions and 0 deletions

View File

@@ -3737,6 +3737,11 @@ ex_substitute(exarg_T *eap)
*/
if (*cmd == '\\')
{
if (in_vim9script())
{
emsg(_(e_cannot_use_s_backslash_in_vim9_script));
return;
}
++cmd;
if (vim_strchr((char_u *)"/?&", *cmd) == NULL)
{