mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
520a4f06e2
commit
c147766389
@ -2483,7 +2483,21 @@ static void add_pack_plugin(char_u *fname, void *cookie)
|
||||
// find the part up to "pack" in 'runtimepath'
|
||||
char_u c = *p4;
|
||||
*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) {
|
||||
// not found, append at the end
|
||||
insp = p_rtp + STRLEN(p_rtp);
|
||||
|
@ -75,6 +75,7 @@ static char *features[] = {
|
||||
|
||||
// clang-format off
|
||||
static int included_patches[] = {
|
||||
1973,
|
||||
1960,
|
||||
1840,
|
||||
1832,
|
||||
|
Loading…
Reference in New Issue
Block a user