0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 script

Problem:    Vim9: cannot use legacy syntax in Vim9 script.
Solution:   Add the :legacy command.
This commit is contained in:
Bram Moolenaar
2021-04-24 14:15:41 +02:00
parent 7ba1e4d363
commit 96cf4ba8fb
11 changed files with 64 additions and 28 deletions

View File

@@ -27,8 +27,9 @@ in_vim9script(void)
{
// "sc_version" is also set when compiling a ":def" function in legacy
// script.
return current_sctx.sc_version == SCRIPT_VERSION_VIM9
|| (cmdmod.cmod_flags & CMOD_VIM9CMD);
return (current_sctx.sc_version == SCRIPT_VERSION_VIM9
|| (cmdmod.cmod_flags & CMOD_VIM9CMD))
&& !(cmdmod.cmod_flags & CMOD_LEGACY);
}
#if defined(FEAT_EVAL) || defined(PROTO)