diff options
-rw-r--r-- | src/nvim/ex_cmds2.c | 16 | ||||
-rw-r--r-- | src/nvim/version.c | 1 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 56f0ca0904..bf75e635b5 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -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); diff --git a/src/nvim/version.c b/src/nvim/version.c index 358b2cc2f0..8aa3071395 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -75,6 +75,7 @@ static char *features[] = { // clang-format off static int included_patches[] = { + 1973, 1960, 1840, 1832, |