vim-patch:7.4.1973

Problem:    On MS-Windows the package directory may be added at the end
            because of forward/backward slash differences. (Matthew
            Desjardins)
Solution:   Ignore slash differences.

4c5717ed8a
This commit is contained in:
James McCoy 2016-07-08 00:27:05 -04:00
parent 520a4f06e2
commit c147766389
2 changed files with 16 additions and 1 deletions

View File

@ -2483,7 +2483,21 @@ static void add_pack_plugin(char_u *fname, void *cookie)
// find the part up to "pack" in 'runtimepath' // find the part up to "pack" in 'runtimepath'
char_u c = *p4; char_u c = *p4;
*p4 = NUL; *p4 = NUL;
char_u *insp = (char_u *)strstr((char *)p_rtp, (char *)ffname);
// Find "ffname" in "p_rtp", ignoring '/' vs '\' differences
int fname_len = STRLEN(ffname);
char_u *insp = p_rtp;
for (;;) {
if (vim_fnamencmp(insp, ffname, fname_len) == 0) {
break;
}
insp = vim_strchr(insp, ',');
if (insp == NULL) {
break;
}
insp++;
}
if (insp == NULL) { if (insp == NULL) {
// not found, append at the end // not found, append at the end
insp = p_rtp + STRLEN(p_rtp); insp = p_rtp + STRLEN(p_rtp);

View File

@ -75,6 +75,7 @@ static char *features[] = {
// clang-format off // clang-format off
static int included_patches[] = { static int included_patches[] = {
1973,
1960, 1960,
1840, 1840,
1832, 1832,