diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-01-22 11:27:29 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-01-22 11:27:29 +0000 |
commit | b697dc295d0625bf2445649f03019f9b8fccc1a8 (patch) | |
tree | 5dccc253b9b1b5e7a6469c74f63ca3682b29c6d4 /src/vim9compile.c | |
parent | 3d8e25a6d2660432df033cdad29f981ffe6ae0fc (diff) | |
download | vim-git-b697dc295d0625bf2445649f03019f9b8fccc1a8.tar.gz |
patch 8.2.4177: Vim9: autoload script not loaded after "vim9script noclear"v8.2.4177
Problem: Vim9: autoload script not loaded after "vim9script noclear".
Solution: Check IMP_FLAGS_AUTOLOAD properly.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c index ddb486b01..2b706ad18 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -621,12 +621,12 @@ find_imported(char_u *name, size_t len, int load, cctx_T *cctx) if (ret == NULL) ret = find_imported_in_script(name, len, current_sctx.sc_sid); - if (ret != NULL && load && ret->imp_flags == IMP_FLAGS_AUTOLOAD) + if (ret != NULL && load && (ret->imp_flags & IMP_FLAGS_AUTOLOAD)) { scid_T dummy; // script found before but not loaded yet - ret->imp_flags = 0; + ret->imp_flags &= ~IMP_FLAGS_AUTOLOAD; (void)do_source(SCRIPT_ITEM(ret->imp_sid)->sn_name, FALSE, DOSO_NONE, &dummy); } |