summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-05 21:13:26 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-05 21:13:26 +0000
commit9fb7b42935f13b5d3407eb82b151da1e9b4b6048 (patch)
treeee717c21805958cca820cfba8e4d4256e7730fed /src/ex_cmds.c
parentb2175220dafc28349b275ac7f3080f89cce78a57 (diff)
patch 8.2.4515: old subsitute syntax is still supportedv8.2.4515
Problem: Old subsitute syntax is still supported. Solution: Disallow using backslash after ":s" in Vim9 script.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index d926df5361..13cde84fd8 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -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)
{