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/main.c | |
parent | ed1e4c9a70aaa7de56bac23e75a846e874a32a56 (diff) | |
download | vim-git-9b8d62267f583d5dc042920adb1de046959ad11d.tar.gz |
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/main.c')
-rw-r--r-- | src/main.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main.c b/src/main.c index 6c591b0a9..ef53b3373 100644 --- a/src/main.c +++ b/src/main.c @@ -3269,9 +3269,8 @@ process_env( int is_viminit) // when TRUE, called for VIMINIT { char_u *initstr; -#ifdef FEAT_EVAL sctx_T save_current_sctx; -#endif + ESTACK_CHECK_DECLARATION if ((initstr = mch_getenv(env)) != NULL && *initstr != NUL) @@ -3280,20 +3279,19 @@ process_env( vimrc_found(NULL, NULL); estack_push(ETYPE_ENV, env, 0); ESTACK_CHECK_SETUP -#ifdef FEAT_EVAL save_current_sctx = current_sctx; + current_sctx.sc_version = 1; +#ifdef FEAT_EVAL current_sctx.sc_sid = SID_ENV; current_sctx.sc_seq = 0; current_sctx.sc_lnum = 0; - current_sctx.sc_version = 1; #endif + do_cmdline_cmd(initstr); ESTACK_CHECK_NOW estack_pop(); -#ifdef FEAT_EVAL current_sctx = save_current_sctx; -#endif return OK; } return FAIL; |