comparison src/scriptfile.c @ 24874:14b0b35d8488 v8.2.2975

patch 8.2.2975: Vim9: can only use an autoload function name as a string Commit: https://github.com/vim/vim/commit/f0a4069e3df904ac6bd57718ec06e56c5d7363e4 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Jun 11 22:05:47 2021 +0200 patch 8.2.2975: Vim9: can only use an autoload function name as a string Problem: Vim9: can only use an autoload function name as a string. Solution: Load the autoload script when encountered. (closes https://github.com/vim/vim/issues/8124)
author Bram Moolenaar <Bram@vim.org>
date Fri, 11 Jun 2021 22:15:03 +0200
parents 524120691c3d
children c4ad84c7e15f
comparison
equal deleted inserted replaced
24873:e66659584572 24874:14b0b35d8488
1126 #endif 1126 #endif
1127 #ifdef FEAT_PROFILE 1127 #ifdef FEAT_PROFILE
1128 proftime_T wait_start; 1128 proftime_T wait_start;
1129 #endif 1129 #endif
1130 int trigger_source_post = FALSE; 1130 int trigger_source_post = FALSE;
1131 int save_estack_compiling = estack_compiling;
1131 ESTACK_CHECK_DECLARATION 1132 ESTACK_CHECK_DECLARATION
1132 1133
1133 p = expand_env_save(fname); 1134 p = expand_env_save(fname);
1134 if (p == NULL) 1135 if (p == NULL)
1135 return retval; 1136 return retval;
1140 if (mch_isdir(fname_exp)) 1141 if (mch_isdir(fname_exp))
1141 { 1142 {
1142 smsg(_("Cannot source a directory: \"%s\""), fname); 1143 smsg(_("Cannot source a directory: \"%s\""), fname);
1143 goto theend; 1144 goto theend;
1144 } 1145 }
1146 estack_compiling = FALSE;
1145 1147
1146 #ifdef FEAT_EVAL 1148 #ifdef FEAT_EVAL
1147 // See if we loaded this script before. 1149 // See if we loaded this script before.
1148 for (sid = script_items.ga_len; sid > 0; --sid) 1150 for (sid = script_items.ga_len; sid > 0; --sid)
1149 { 1151 {
1506 if (trigger_source_post) 1508 if (trigger_source_post)
1507 apply_autocmds(EVENT_SOURCEPOST, fname_exp, fname_exp, FALSE, curbuf); 1509 apply_autocmds(EVENT_SOURCEPOST, fname_exp, fname_exp, FALSE, curbuf);
1508 1510
1509 theend: 1511 theend:
1510 vim_free(fname_exp); 1512 vim_free(fname_exp);
1513 estack_compiling = save_estack_compiling;
1511 return retval; 1514 return retval;
1512 } 1515 }
1513 1516
1514 #if defined(FEAT_EVAL) || defined(PROTO) 1517 #if defined(FEAT_EVAL) || defined(PROTO)
1515 1518