diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-10-13 15:04:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-10-13 15:04:34 +0100 |
commit | 7b829268921e8fc1c63c34d245063c1c4e7d21af (patch) | |
tree | a98bfde122c275ec816159fadb69b7280d1dc380 /src/ex_cmds.c | |
parent | fff10d9a76099aa9b944f3c33a911127ca1a0c72 (diff) | |
download | vim-git-7b829268921e8fc1c63c34d245063c1c4e7d21af.tar.gz |
patch 8.2.3503: Vim9: using g:pat:cmd is confusingv8.2.3503
Problem: Vim9: using g:pat:cmd is confusing.
Solution: Do not recognize g: as the :global command. Also for s:pat:repl.
(closes #8982)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 5c92e094e..78a87e76a 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3724,6 +3724,9 @@ ex_substitute(exarg_T *eap) // don't accept alphanumeric for separator if (check_regexp_delim(*cmd) == FAIL) return; + if (in_vim9script() && check_global_and_subst(eap->cmd, eap->arg) + == FAIL) + return; /* * undocumented vi feature: @@ -4899,6 +4902,9 @@ ex_global(exarg_T *eap) cmd = eap->arg; which_pat = RE_LAST; // default: use last used regexp + if (in_vim9script() && check_global_and_subst(eap->cmd, eap->arg) == FAIL) + return; + /* * undocumented vi feature: * "\/" and "\?": use previous search pattern. |