vim-patch:7.4.1550

Problem:    Cannot load packages early.
Solution:   Add the ":packloadall" command.

2d8f56acb3
This commit is contained in:
James McCoy
2016-06-20 20:24:13 -04:00
parent ea18b4a60f
commit 26f74fdf61
5 changed files with 39 additions and 5 deletions

View File

@@ -1854,6 +1854,12 @@ return {
addr_type=ADDR_LINES,
func='ex_packadd',
},
{
command='packloadall',
flags=bit.bor(BANG, TRLBAR, SBOXOK, CMDWIN),
addr_type=ADDR_LINES,
func='ex_packloadall',
},
{
command='pclose',
flags=bit.bor(BANG, TRLBAR),

View File

@@ -2496,11 +2496,17 @@ theend:
xfree(ffname);
}
static bool did_source_packages = false;
// ":packloadall"
// Find plugins in the package directories and source them.
void source_packages(void)
void ex_packloadall(exarg_T *eap)
{
do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
add_pack_plugin, p_pp);
if (!did_source_packages || (eap != NULL && eap->forceit)) {
did_source_packages = true;
do_in_path(p_pp, (char_u *)"pack/*/start/*", DIP_ALL + DIP_DIR,
add_pack_plugin, p_pp);
}
}
/// ":packadd[!] {name}"

View File

@@ -1244,7 +1244,7 @@ static void load_plugins(void)
source_runtime((char_u *)"plugin/**/*.vim", TRUE);
TIME_MSG("loading plugins");
source_packages();
ex_packloadall(NULL);
TIME_MSG("loading packages");
}
}

View File

@@ -145,7 +145,7 @@ static int included_patches[] = {
// 1553,
// 1552,
// 1551,
// 1550,
1550,
// 1549,
// 1548,
// 1547,