comparison src/evalvars.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 f1a390885192
children 0d8baefcf4ed
comparison
equal deleted inserted replaced
24873:e66659584572 24874:14b0b35d8488
2919 2919
2920 ht = get_funccal_local_ht(); 2920 ht = get_funccal_local_ht();
2921 if (ht != NULL) 2921 if (ht != NULL)
2922 return ht; // local variable 2922 return ht; // local variable
2923 2923
2924 // in Vim9 script items at the script level are script-local 2924 // In Vim9 script items at the script level are script-local, except
2925 if (in_vim9script()) 2925 // for autoload names.
2926 if (in_vim9script() && vim_strchr(name, AUTOLOAD_CHAR) == NULL)
2926 { 2927 {
2927 ht = get_script_local_ht(); 2928 ht = get_script_local_ht();
2928 if (ht != NULL) 2929 if (ht != NULL)
2929 return ht; 2930 return ht;
2930 } 2931 }