]> granicus.if.org Git - vim/commitdiff
patch 8.2.2513: Vim9: missing part of :vim9cmd change v8.2.2513
authorBram Moolenaar <Bram@vim.org>
Sun, 14 Feb 2021 12:30:01 +0000 (13:30 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 14 Feb 2021 12:30:01 +0000 (13:30 +0100)
Problem:    Vim9: missing part of :vim9cmd change.
Solution:   Use command modifier in in_vim9script().

src/version.c
src/vim9script.c

index dabc2af706a5d5fcf6c02cee578f8a059c954c07..20bc9a225ab30dad7e76198523ef4b5e92906daf 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2513,
 /**/
     2512,
 /**/
index fea478592d73eedfc0de8585dae84a74b803b2eb..d40104cb7acfb268041e1c187ce6b9a65fdafec5 100644 (file)
@@ -23,7 +23,8 @@ in_vim9script(void)
     // Do not go up the stack, a ":function" inside vim9script uses legacy
     // syntax.  "sc_version" is also set when compiling a ":def" function in
     // legacy script.
-    return current_sctx.sc_version == SCRIPT_VERSION_VIM9;
+    return current_sctx.sc_version == SCRIPT_VERSION_VIM9
+               || (cmdmod.cmod_flags & CMOD_VIM9CMD);
 }
 
 /*