diff options
author | James McCoy <jamessan@jamessan.com> | 2017-08-21 12:47:58 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-08-21 20:29:49 -0400 |
commit | 622c3454dff35cae7ec93383bbf49f16621dc778 (patch) | |
tree | 968004dd7f313bf2774e3275ae1c9f0e737b1fe0 /src/nvim/main.c | |
parent | fc7bf1c71d41dae7b8ab7e82b92ec0e8253b5291 (diff) | |
download | rneovim-622c3454dff35cae7ec93383bbf49f16621dc778.tar.gz rneovim-622c3454dff35cae7ec93383bbf49f16621dc778.tar.bz2 rneovim-622c3454dff35cae7ec93383bbf49f16621dc778.zip |
vim-patch:8.0.0612
Problem: Package directories are added to 'runtimepath' only after loading
non-package plugins.
Solution: Split off the code to add package directories to 'runtimepath'.
(Ingo Karkat, closes vim/vim#1680)
https://github.com/vim/vim/commit/ce876aaa9a250a5a0d0e34b3a2625e51cf9bf5bb
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index a665ad1de2..6e85fbc130 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -1291,10 +1291,21 @@ static void set_window_layout(mparm_T *paramp) static void load_plugins(void) { if (p_lpl) { + // First add all package directories to 'runtimepath', so that their + // autoload directories can be found. Only if not done already with a + // :packloadall command. + if (!did_source_packages) { + add_pack_start_dirs(); + } + source_runtime((char_u *)"plugin/**/*.vim", DIP_ALL | DIP_NOAFTER); // NOLINT TIME_MSG("loading plugins"); - ex_packloadall(NULL); + // Only source "start" packages if not done already with a :packloadall + // command. + if (!did_source_packages) { + load_start_packages(); + } TIME_MSG("loading packages"); source_runtime((char_u *)"plugin/**/*.vim", DIP_ALL | DIP_AFTER); |