diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-09-18 17:14:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-18 17:14:25 +0200 |
commit | 6cad86fffdb91d3997a707ff6adb0b5991587b3e (patch) | |
tree | b929329658316d6a8a7aead01f0b701c0e278fca /src/nvim/main.c | |
parent | 8ef2b56cac895c151345cf0ff0a97456c0a7fdd2 (diff) | |
parent | a860f7880fd5d5cef5299ff8d450ac037bee2300 (diff) | |
download | rneovim-6cad86fffdb91d3997a707ff6adb0b5991587b3e.tar.gz rneovim-6cad86fffdb91d3997a707ff6adb0b5991587b3e.tar.bz2 rneovim-6cad86fffdb91d3997a707ff6adb0b5991587b3e.zip |
Merge pull request #15632 from bfredl/rtptest
runtime: always use DIP_START and remove duplication of start packages in &rtp
Diffstat (limited to 'src/nvim/main.c')
-rw-r--r-- | src/nvim/main.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/nvim/main.c b/src/nvim/main.c index 1fc140e525..1507dfac00 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -1352,23 +1352,10 @@ static void load_plugins(void) char_u *const plugin_pattern_vim = (char_u *)"plugin/**/*.vim"; // NOLINT char_u *const plugin_pattern_lua = (char_u *)"plugin/**/*.lua"; // NOLINT - // First add all package directories to 'runtimepath', so that their - // autoload directories can be found. Only if not done already with a - // :packloadall command. - // Make a copy of 'runtimepath', so that source_runtime does not use the - // pack directories. - if (!did_source_packages) { - rtp_copy = vim_strsave(p_rtp); - add_pack_start_dirs(); - } - - source_in_path(rtp_copy == NULL ? p_rtp : rtp_copy, - plugin_pattern_vim, - DIP_ALL | DIP_NOAFTER); - source_in_path(rtp_copy == NULL ? p_rtp : rtp_copy, - plugin_pattern_lua, - DIP_ALL | DIP_NOAFTER); - TIME_MSG("loading plugins"); + // don't use source_runtime() yet so we can check for :packloadall below + source_in_path(p_rtp, plugin_pattern_vim, DIP_ALL | DIP_NOAFTER); + source_in_path(p_rtp, plugin_pattern_lua, DIP_ALL | DIP_NOAFTER); + TIME_MSG("loading rtp plugins"); xfree(rtp_copy); // Only source "start" packages if not done already with a :packloadall |