summaryrefslogtreecommitdiff
path: root/src/vim9script.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-31 16:18:23 +0100
committerBram Moolenaar <Bram@vim.org>2022-03-31 16:18:23 +0100
commitccbfd4883f0385a1d84cc87785ddcc86185b4ad9 (patch)
tree65f63c71b3792956985261e7ae0e4a02df0e9884 /src/vim9script.c
parent1104a6d0c2004d39e9b6cb8f804d12b628a69869 (diff)
downloadvim-git-ccbfd4883f0385a1d84cc87785ddcc86185b4ad9.tar.gz
patch 8.2.4656: Vim9: can't use item from "import autoload" with autoload dirv8.2.4656
Problem: Vim9: can't use items from "import autoload" with autoload directory name. Solution: Let sn_autoload_prefix overrule sn_import_autoload. (closes #10054)
Diffstat (limited to 'src/vim9script.c')
-rw-r--r--src/vim9script.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vim9script.c b/src/vim9script.c
index a63f2f7dd..cd9ff92cd 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -415,6 +415,9 @@ handle_import_fname(char_u *fname, int is_autoload, int *sid)
si = SCRIPT_ITEM(*sid);
si->sn_import_autoload = TRUE;
+ if (si->sn_autoload_prefix == NULL)
+ si->sn_autoload_prefix = get_autoload_prefix(si);
+
// with testing override: load autoload script right away
if (!override_autoload || si->sn_state != SN_STATE_NOT_LOADED)
return OK;