mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 08:18:17 +00:00
vim-patch:8.0.0680
Problem: Plugins in start packages are sourced twice. (mseplowitz)
Solution: Use the unmodified runtime path when loading plugins (test by Ingo
Karkat, closes vim/vim#1801)
07ecfa64a1
This commit is contained in:
@@ -1291,15 +1291,23 @@ static void set_window_layout(mparm_T *paramp)
|
||||
static void load_plugins(void)
|
||||
{
|
||||
if (p_lpl) {
|
||||
char_u *rtp_copy = NULL;
|
||||
|
||||
// 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_runtime((char_u *)"plugin/**/*.vim", DIP_ALL | DIP_NOAFTER); // NOLINT
|
||||
source_in_path(rtp_copy == NULL ? p_rtp : rtp_copy,
|
||||
(char_u *)"plugin/**/*.vim", // NOLINT
|
||||
DIP_ALL | DIP_NOAFTER);
|
||||
TIME_MSG("loading plugins");
|
||||
xfree(rtp_copy);
|
||||
|
||||
// Only source "start" packages if not done already with a :packloadall
|
||||
// command.
|
||||
|
Reference in New Issue
Block a user