diff options
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 3f211d7ab8..17125ec798 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -2496,11 +2496,17 @@ theend: xfree(ffname); } +static bool did_source_packages = false; + +// ":packloadall" // Find plugins in the package directories and source them. -void source_packages(void) +void ex_packloadall(exarg_T *eap) { - do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR, - add_pack_plugin, p_pp); + if (!did_source_packages || (eap != NULL && eap->forceit)) { + did_source_packages = true; + do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR, + add_pack_plugin, p_pp); + } } /// ":packadd[!] {name}" |