Mercurial > vim
comparison src/vim9compile.c @ 27074:19fefc42a063 v8.2.4066
patch 8.2.4066: Vim9: imported autoload script loaded again
Commit: https://github.com/vim/vim/commit/17d36cbcd36d944c744ef68afa971718959b2111
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 12 11:46:40 2022 +0000
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Jan 2022 13:00:06 +0100 |
parents | f17bdc9cda64 |
children | 6fc63c6a7ee7 |
comparison
equal
deleted
inserted
replaced
27073:4ab8aec1b847 | 27074:19fefc42a063 |
---|---|
621 if (ret == NULL) | 621 if (ret == NULL) |
622 ret = find_imported_in_script(name, len, current_sctx.sc_sid); | 622 ret = find_imported_in_script(name, len, current_sctx.sc_sid); |
623 | 623 |
624 if (ret != NULL && load && ret->imp_flags == IMP_FLAGS_AUTOLOAD) | 624 if (ret != NULL && load && ret->imp_flags == IMP_FLAGS_AUTOLOAD) |
625 { | 625 { |
626 scid_T dummy; | |
627 | |
626 // script found before but not loaded yet | 628 // script found before but not loaded yet |
627 ret->imp_flags = 0; | 629 ret->imp_flags = 0; |
628 (void)do_source(SCRIPT_ITEM(ret->imp_sid)->sn_name, FALSE, | 630 (void)do_source(SCRIPT_ITEM(ret->imp_sid)->sn_name, FALSE, |
629 DOSO_NONE, NULL); | 631 DOSO_NONE, &dummy); |
630 } | 632 } |
631 return ret; | 633 return ret; |
632 } | 634 } |
633 | 635 |
634 /* | 636 /* |