diff options
| author | Bram Moolenaar <Bram@vim.org> | 2016-03-12 20:34:27 +0100 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2016-03-12 20:34:27 +0100 |
| commit | 2d8f56acb32428d0f965d42dd13b27100b46fa15 (patch) | |
| tree | ced455063c579ac46ff0c7f269e4869aa6504386 /src/ex_cmds2.c | |
| parent | c835293d54c223627c7d4516ee273c21a3506fa1 (diff) | |
| download | vim-git-2d8f56acb32428d0f965d42dd13b27100b46fa15.tar.gz | |
patch 7.4.1550v7.4.1550
Problem: Cannot load packages early.
Solution: Add the ":packloadall" command.
Diffstat (limited to 'src/ex_cmds2.c')
| -rw-r--r-- | src/ex_cmds2.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 19d7d19fa..616f7a078 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3189,14 +3189,21 @@ theend: vim_free(ffname); } +static int did_source_packages = FALSE; + /* + * ":packloadall" * Find plugins in the package directories and source them. */ void -source_packages() +ex_packloadall(exarg_T *eap) { - do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR, + 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); + } } /* |
