From 6d57b48a5392988247778de7cfb8165bad8a9196 Mon Sep 17 00:00:00 2001 From: watiko Date: Tue, 9 Feb 2016 15:21:29 +0900 Subject: vim-patch:7.4.737 Problem: On MS-Windows vimgrep over arglist doesn't work (Issue 361) Solution: Only escape backslashes in ## expansion when it is not used as the path separator. (James McCoy) https://github.com/vim/vim/commit/6e8d3b0d41bcef7ebe0ba2e887eb25781e1437fe --- Fix a lint error for the closing parenthesis. NOLINT does not help to do this. --- src/nvim/ex_docmd.c | 20 +++++++++++++------- src/nvim/version.c | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 50513c0a6a..d6976bcb8f 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -8283,16 +8283,22 @@ static char_u *arg_all(void) retval[len] = ' '; ++len; } - for (; *p != NUL; ++p) { - if (*p == ' ' || *p == '\\') { - /* insert a backslash */ - if (retval != NULL) + for (; *p != NUL; p++) { + if (*p == ' ' +#ifndef BACKSLASH_IN_FILENAME + || *p == '\\' +#endif + ) { + // insert a backslash + if (retval != NULL) { retval[len] = '\\'; - ++len; + } + len++; } - if (retval != NULL) + if (retval != NULL) { retval[len] = *p; - ++len; + } + len++; } } diff --git a/src/nvim/version.c b/src/nvim/version.c index 269f9872d0..cbe7588923 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -551,7 +551,7 @@ static int included_patches[] = { 740, 739, // 738 NA - // 737, + 737, 736, // 735, // 734, -- cgit