0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-01-12 19:54:00 +00:00
parent 53c296112e
commit d041f4208b
6 changed files with 83 additions and 4 deletions

View File

@@ -714,7 +714,6 @@ generate_PUSHBLOB(cctx_T *cctx, blob_T *blob)
/*
* Generate an ISN_PUSHFUNC instruction with name "name".
* Consumes "name".
*/
int
generate_PUSHFUNC(cctx_T *cctx, char_u *name, type_T *type)
@@ -727,7 +726,8 @@ generate_PUSHFUNC(cctx_T *cctx, char_u *name, type_T *type)
return FAIL;
if (name == NULL)
funcname = NULL;
else if (*name == K_SPECIAL) // script-local
else if (*name == K_SPECIAL // script-local
|| vim_strchr(name, AUTOLOAD_CHAR) != NULL) // autoload
funcname = vim_strsave(name);
else
{