comparison src/vim9execute.c @ 27086:1e2a6c6c7e42 v8.2.4072

patch 8.2.4072: Vim9: compiling function fails when autoload is not loaded Commit: https://github.com/vim/vim/commit/d041f4208b0a2149e9d41f6443aa1c14c076a411 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jan 12 19:54:00 2022 +0000 patch 8.2.4072: Vim9: compiling function fails when autoload is not loaded Problem: Vim9: compiling function fails when autoload script is not loaded yet. Solution: Depend on runtime loading.
author Bram Moolenaar <Bram@vim.org>
date Wed, 12 Jan 2022 21:00:05 +0100
parents c9474ae175f4
children 98a01021e465
comparison
equal deleted inserted replaced
27085:40b273e28f26 27086:1e2a6c6c7e42
2224 break; 2224 break;
2225 default: // Cannot reach here 2225 default: // Cannot reach here
2226 goto theend; 2226 goto theend;
2227 } 2227 }
2228 di = find_var_in_ht(ht, 0, iptr->isn_arg.string, TRUE); 2228 di = find_var_in_ht(ht, 0, iptr->isn_arg.string, TRUE);
2229
2230 if (di == NULL && ht == get_globvar_ht())
2231 {
2232 // may need to load autoload script
2233 if (script_autoload(iptr->isn_arg.string, FALSE))
2234 di = find_var_in_ht(ht, 0,
2235 iptr->isn_arg.string, TRUE);
2236 if (did_emsg)
2237 goto on_error;
2238 }
2229 2239
2230 if (di == NULL) 2240 if (di == NULL)
2231 { 2241 {
2232 SOURCING_LNUM = iptr->isn_lnum; 2242 SOURCING_LNUM = iptr->isn_lnum;
2233 semsg(_(e_undefined_variable_char_str), 2243 semsg(_(e_undefined_variable_char_str),