diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-04-24 14:15:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-04-24 14:15:41 +0200 |
commit | 96cf4ba8fb96e5778192d2dab7458b9a7da0a49d (patch) | |
tree | 13f60474468dc98fcfd1173a94d3614b438e1278 /src/ex_docmd.c | |
parent | 7ba1e4d363164e32a93cceab64b42e8c6d89e9f3 (diff) |
patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 scriptv8.2.2805
Problem: Vim9: cannot use legacy syntax in Vim9 script.
Solution: Add the :legacy command.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index db7bb931f8..0d87a89440 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -2925,6 +2925,17 @@ parse_command_modifiers( cmod->cmod_flags |= CMOD_LOCKMARKS; continue; } + if (checkforcmd_noparen(&eap->cmd, "legacy", 3)) + { + if (ends_excmd2(p, eap->cmd)) + { + *errormsg = + _(e_vim9cmd_must_be_followed_by_command); + return FAIL; + } + cmod->cmod_flags |= CMOD_LEGACY; + continue; + } if (!checkforcmd_noparen(&eap->cmd, "leftabove", 5)) break; |