]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.0369: Vim9: problem when importing autoloaded scripts v9.1.0369
authorErnie Rael <errael@raelity.com>
Wed, 24 Apr 2024 18:07:50 +0000 (20:07 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 24 Apr 2024 18:07:50 +0000 (20:07 +0200)
commit3f821d6de2586d921fb23e2facb4764ef9eb3294
treec576910f877e4e43093a534172c1a4e7bdf329c4
parent04e8943556fbe2e53ce611f753141442bc8c655a
patch 9.1.0369: Vim9: problem when importing autoloaded scripts

Problem:  Vim9: problem when importing autoloaded scripts
Solution: In `:def` handle storing to vim9 autoload export
          (Ernie Rael)

Problem occurs when `import autoload ./.../autoload/...`. The autoload
in the specified path causes the use of an autoload_prefix which combines
with the `import autoload` to create trouble.

In `generate_store_var()` `case dest_script` use ISN_STOREEXPORT,
when needed, instead of ISN_STORES. When executing ISN_STOREEXPORT,
check for autoload_prefix.

fixes: #14606
closes: #14615

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
src/evalvars.c
src/testdir/test_vim9_disassemble.vim
src/testdir/test_vim9_func.vim
src/testdir/test_vim9_import.vim
src/version.c
src/vim9.h
src/vim9compile.c
src/vim9execute.c
src/vim9instr.c