summaryrefslogtreecommitdiff
path: root/src/scriptfile.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-12 15:21:22 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-12 15:21:22 +0200
commita177344dc0c337e5b272c1c59d13964a8318bcfa (patch)
treef7e343d4db0e54ea97e6a3c82fe921db35f6395d /src/scriptfile.c
parent575f24b3f3d8cd8bfc2da402c2938c0c7ace7877 (diff)
downloadvim-git-a177344dc0c337e5b272c1c59d13964a8318bcfa.tar.gz
patch 8.2.1426: Vim9: cannot call autoload function in :def functionv8.2.1426
Problem: Vim9: cannot call autoload function in :def function. Solution: Load the autoload script. (closes #6690)
Diffstat (limited to 'src/scriptfile.c')
-rw-r--r--src/scriptfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/scriptfile.c b/src/scriptfile.c
index 38215914d..320340f8d 100644
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -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 = '/';