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)

ce876aaa9a
This commit is contained in:
James McCoy
2017-08-21 12:47:58 -04:00
parent fc7bf1c71d
commit 622c3454df
5 changed files with 65 additions and 11 deletions

View File

@@ -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);