commit | 9fb7b42935f13b5d3407eb82b151da1e9b4b6048 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Sat Mar 05 21:13:26 2022 +0000 |
committer | Bram Moolenaar <Bram@vim.org> | Sat Mar 05 21:13:26 2022 +0000 |
tree | ee717c21805958cca820cfba8e4d4256e7730fed | |
parent | b2175220dafc28349b275ac7f3080f89cce78a57 [diff] [blame] |
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.
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index d926df5..13cde84 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c
@@ -3737,6 +3737,11 @@ */ if (*cmd == '\\') { + if (in_vim9script()) + { + emsg(_(e_cannot_use_s_backslash_in_vim9_script)); + return; + } ++cmd; if (vim_strchr((char_u *)"/?&", *cmd) == NULL) {