mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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.
This commit is contained in:
@@ -3349,6 +3349,7 @@ add_pack_plugin(char_u *fname, void *cookie)
|
|||||||
char_u *afterdir;
|
char_u *afterdir;
|
||||||
size_t afterlen = 0;
|
size_t afterlen = 0;
|
||||||
char_u *ffname = fix_fname(fname);
|
char_u *ffname = fix_fname(fname);
|
||||||
|
int fname_len;
|
||||||
|
|
||||||
if (ffname == NULL)
|
if (ffname == NULL)
|
||||||
return;
|
return;
|
||||||
@@ -3369,7 +3370,20 @@ add_pack_plugin(char_u *fname, void *cookie)
|
|||||||
* find the part up to "pack" in 'runtimepath' */
|
* find the part up to "pack" in 'runtimepath' */
|
||||||
c = *p4;
|
c = *p4;
|
||||||
*p4 = NUL;
|
*p4 = NUL;
|
||||||
insp = (char_u *)strstr((char *)p_rtp, (char *)ffname);
|
|
||||||
|
/* Find "ffname" in "p_rtp", ignoring '/' vs '\' differences. */
|
||||||
|
fname_len = STRLEN(ffname);
|
||||||
|
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);
|
||||||
|
@@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1973,
|
||||||
/**/
|
/**/
|
||||||
1972,
|
1972,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user