Mercurial > vim
diff src/ex_cmds2.c @ 8520:b4350a4d1e01 v7.4.1550
commit https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 12 20:34:27 2016 +0100
patch 7.4.1550
Problem: Cannot load packages early.
Solution: Add the ":packloadall" command.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 12 Mar 2016 20:45:04 +0100 |
parents | aec051e61547 |
children | 721e8d6cb7b5 |
line wrap: on
line diff
--- 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); + } } /*