# HG changeset patch # User Christian Brabandt # Date 1467380707 -7200 # Node ID 2547ef4191230687afe88a31c6f1687bf535bd2e # Parent eb47189e7dd71c97a3400ad53af8cc50b13653ba commit https://github.com/vim/vim/commit/4c5717ed8a81f5ae9dfe4f38b17a61fc8421054b Author: Bram Moolenaar Date: Fri Jul 1 15:39:40 2016 +0200 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. diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3349,6 +3349,7 @@ add_pack_plugin(char_u *fname, void *coo char_u *afterdir; size_t afterlen = 0; char_u *ffname = fix_fname(fname); + int fname_len; if (ffname == NULL) return; @@ -3369,7 +3370,20 @@ add_pack_plugin(char_u *fname, void *coo * find the part up to "pack" in 'runtimepath' */ c = *p4; *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) /* not found, append at the end */ insp = p_rtp + STRLEN(p_rtp); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1973, +/**/ 1972, /**/ 1971,