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

patch 8.2.1426: Vim9: cannot call autoload function in :def function

Problem:    Vim9: cannot call autoload function in :def function.
Solution:   Load the autoload script. (closes #6690)
This commit is contained in:
Bram Moolenaar
2020-08-12 15:21:22 +02:00
parent 575f24b3f3
commit a177344dc0
5 changed files with 45 additions and 4 deletions

View File

@@ -1991,7 +1991,7 @@ autoload_name(char_u *name)
if (scriptname == NULL)
return NULL;
STRCPY(scriptname, "autoload/");
STRCAT(scriptname, name);
STRCAT(scriptname, name[0] == 'g' && name[1] == ':' ? name + 2: name);
for (p = scriptname + 9; (p = vim_strchr(p, AUTOLOAD_CHAR)) != NULL;
q = p, ++p)
*p = '/';