patch 8.2.4066: Vim9: imported autoload script loaded again
Problem: Vim9: imported autoload script loaded again.
Solution: Do not create a new imported_T every time.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 963c052..90cb2b4 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -623,10 +623,12 @@
if (ret != NULL && load && ret->imp_flags == IMP_FLAGS_AUTOLOAD)
{
+ scid_T dummy;
+
// script found before but not loaded yet
ret->imp_flags = 0;
(void)do_source(SCRIPT_ITEM(ret->imp_sid)->sn_name, FALSE,
- DOSO_NONE, NULL);
+ DOSO_NONE, &dummy);
}
return ret;
}