fix(runtime): ordering of loading packages with user config

site packages must be sourced before user config

NOTE: we only consider dirs exactly matching "after" to be an AFTER dir.
vim8 considers all dirs like "foo/bar_after", "Xafter" etc, as an
"after" dir in SOME codepaths not not in ALL codepaths.
This commit is contained in:
Björn Linse
2021-09-19 12:11:41 +02:00
parent b3b02eb529
commit ac3288d556
6 changed files with 269 additions and 31 deletions

View File

@@ -2397,6 +2397,8 @@ static char_u *did_set_string_option(int opt_idx, char_u **varp, bool new_value_
os_setenv("VIMRUNTIME", "", 1);
didset_vimruntime = false;
}
} else if (varp == &p_rtp || varp == &p_pp) { // 'runtimepath' 'packpath'
invalidate_search_path();
} else if (varp == &curwin->w_p_culopt
|| gvarp == &curwin->w_allbuf_opt.wo_culopt) { // 'cursorlineopt'
if (**varp == NUL || fill_culopt_flags(*varp, curwin) != OK) {