diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-02-11 20:33:48 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-11 20:33:48 +0000 |
commit | 5b1d6e98c6610553fe3946086cdba77718bd69d5 (patch) | |
tree | eaf6cc403e6f80de9a36b892c260c967d26e419b /src/eval.c | |
parent | bd89d4406327d3a30517443a4a518f49ebc99368 (diff) |
patch 8.2.4348: "legacy exe cmd" does not do what one would expectv8.2.4348
Problem: "legacy exe cmd" does not do what one would expect.
Solution: Apply the "legacy" and "vim9script" command modifiers to the
argument of ":execute".
Diffstat (limited to 'src/eval.c')
-rw-r--r-- | src/eval.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index d775ee3f26..81a1dd0a97 100644 --- a/src/eval.c +++ b/src/eval.c @@ -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); |