diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-28 18:26:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-28 18:26:00 +0100 |
commit | 9b8d62267f583d5dc042920adb1de046959ad11d (patch) | |
tree | 8a2c9ab0af5fee27b1acfb6b707045d2b4bf898f /src/globals.h | |
parent | ed1e4c9a70aaa7de56bac23e75a846e874a32a56 (diff) |
patch 8.2.2238: Vim9: cannot load a Vim9 script without the +eval featurev8.2.2238
Problem: Vim9: cannot load a Vim9 script without the +eval feature.
Solution: Support Vim9 script syntax without the +eval feature.
Diffstat (limited to 'src/globals.h')
-rw-r--r-- | src/globals.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/globals.h b/src/globals.h index 39ef83e495..dcb0f63243 100644 --- a/src/globals.h +++ b/src/globals.h @@ -290,6 +290,14 @@ EXTERN garray_T exestack INIT5(0, 0, sizeof(estack_T), 50, NULL); // line number in the message source or zero #define SOURCING_LNUM (((estack_T *)exestack.ga_data)[exestack.ga_len - 1].es_lnum) +// Script CTX being sourced or was sourced to define the current function. +EXTERN sctx_T current_sctx +#ifdef FEAT_EVAL + INIT4(0, 0, 0, 0); +#else + INIT(= {0}); +#endif + #ifdef FEAT_EVAL // whether inside compile_def_function() EXTERN int estack_compiling INIT(= FALSE); @@ -392,9 +400,6 @@ EXTERN int may_garbage_collect INIT(= FALSE); EXTERN int want_garbage_collect INIT(= FALSE); EXTERN int garbage_collect_at_exit INIT(= FALSE); -// Script CTX being sourced or was sourced to define the current function. -EXTERN sctx_T current_sctx INIT4(0, 0, 0, 0); - // Commonly used types. EXTERN type_T t_unknown INIT6(VAR_UNKNOWN, 0, 0, TTFLAG_STATIC, NULL, NULL); |