diff options
| author | James McCoy <jamessan@jamessan.com> | 2016-06-20 20:24:13 -0400 | 
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2016-07-08 01:43:37 -0400 | 
| commit | 26f74fdf61827f5afc6fe4e90b9e9497264cb039 (patch) | |
| tree | fa722246ff2dde5886b6ad6cc40e87b39e3d7b1c /src/nvim/ex_cmds2.c | |
| parent | ea18b4a60f3b89d261c46b030d3d026ddad864bb (diff) | |
| download | rneovim-26f74fdf61827f5afc6fe4e90b9e9497264cb039.tar.gz rneovim-26f74fdf61827f5afc6fe4e90b9e9497264cb039.tar.bz2 rneovim-26f74fdf61827f5afc6fe4e90b9e9497264cb039.zip | |
vim-patch:7.4.1550
Problem:    Cannot load packages early.
Solution:   Add the ":packloadall" command.
https://github.com/vim/vim/commit/2d8f56acb32428d0f965d42dd13b27100b46fa15
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}" | 
