0
0
mirror of https://github.com/vim/vim.git synced 2025-10-10 06:24:10 -04:00

patch 8.2.4348: "legacy exe cmd" does not do what one would expect

Problem:    "legacy exe cmd" does not do what one would expect.
Solution:   Apply the "legacy" and "vim9script" command modifiers to the
            argument of ":execute".
This commit is contained in:
Bram Moolenaar
2022-02-11 20:33:48 +00:00
parent bd89d44063
commit 5b1d6e98c6
6 changed files with 42 additions and 5 deletions

View File

@@ -6491,8 +6491,16 @@ ex_execute(exarg_T *eap)
did_emsg = save_did_emsg;
}
else if (eap->cmdidx == CMD_execute)
{
int save_sticky_cmdmod_flags = sticky_cmdmod_flags;
// "legacy exe cmd" and "vim9cmd exe cmd" applies to "cmd".
sticky_cmdmod_flags = cmdmod.cmod_flags
& (CMOD_LEGACY | CMOD_VIM9CMD);
do_cmdline((char_u *)ga.ga_data,
eap->getline, eap->cookie, DOCMD_NOWAIT|DOCMD_VERBOSE);
sticky_cmdmod_flags = save_sticky_cmdmod_flags;
}
}
ga_clear(&ga);