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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user