Mercurial > vim
diff src/vim9instr.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 | 18cafa092e8d |
children | 98a01021e465 |
line wrap: on
line diff
--- a/src/vim9instr.c +++ b/src/vim9instr.c @@ -714,7 +714,6 @@ generate_PUSHBLOB(cctx_T *cctx, blob_T * /* * 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 * 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 {