aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-07-08 00:27:05 -0400
committerJames McCoy <jamessan@jamessan.com>2016-07-08 01:45:21 -0400
commitc147766389a11df0bc6cf86bb1a6bd0e22a6026b (patch)
tree50d72f0734e0efe75401d68fcb42c47ecd9183a3
parent520a4f06e20c3917e75e3a413a290d9141cb0a0c (diff)
downloadrneovim-c147766389a11df0bc6cf86bb1a6bd0e22a6026b.tar.gz
rneovim-c147766389a11df0bc6cf86bb1a6bd0e22a6026b.tar.bz2
rneovim-c147766389a11df0bc6cf86bb1a6bd0e22a6026b.zip
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. https://github.com/vim/vim/commit/4c5717ed8a81f5ae9dfe4f38b17a61fc8421054b
-rw-r--r--src/nvim/ex_cmds2.c16
-rw-r--r--src/nvim/version.c1
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,