vim-patch:8.2.1398: autoload script sourced twice if sourced directly (#22622)

Problem:    Autoload script sourced twice if sourced directly.
Solution:   Do not source an autoload script again. (issue vim/vim#6644)

daa2f36573

Cherry-pick ret_sid changes from patch 8.2.0149.
Use do_in_runtimepath() as that's what source_runtime() calls in Nvim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-03-11 21:29:25 +08:00
committed by GitHub
parent 6d0c61d90d
commit 7dc9182cf0
7 changed files with 59 additions and 49 deletions

View File

@@ -579,7 +579,7 @@ ArrayOf(String) nvim__get_runtime(Array pat, Boolean all, Dict(runtime) *opts, E
if (source) {
for (size_t i = 0; i < res.size; i++) {
String name = res.items[i].data.string;
(void)do_source(name.data, false, DOSO_NONE);
(void)do_source(name.data, false, DOSO_NONE, NULL);
}
}