diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-05-06 23:18:30 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-05-07 03:03:28 -0400 |
commit | f76792a10bfc1f9a55b742e289cd73be13fbf245 (patch) | |
tree | fef74719a1fcd57ddd0586e056f0a923a4e6bc4f | |
parent | b3adfa03b70fd5ecbe485488c10ee952ec811d93 (diff) | |
download | rneovim-f76792a10bfc1f9a55b742e289cd73be13fbf245.tar.gz rneovim-f76792a10bfc1f9a55b742e289cd73be13fbf245.tar.bz2 rneovim-f76792a10bfc1f9a55b742e289cd73be13fbf245.zip |
vim-patch:8.0.0876: backslashes and wildcards in backticks don't work
Problem: MS-Windows: Backslashes and wildcards in backticks don't work.
Solution: Do not handle backslashes inside backticks in the wrong place.
(Yasuhiro Matsumoto, closes vim/vim#1942)
https://github.com/vim/vim/commit/39d21e3c30f3391f3b27f5ddb7e1ad411bdb8f2e
-rw-r--r-- | src/nvim/path.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index a706e32773..67b88a861a 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -1346,6 +1346,15 @@ void slash_adjust(char_u *p) if (path_with_url((const char *)p)) { return; } + + if (*p == '`') { + // don't replace backslash in backtick quoted strings + const size_t len = STRLEN(p); + if (len > 2 && *(p + len - 1) == '`') { + return; + } + } + while (*p) { if (*p == (char_u)psepcN) { *p = (char_u)psepc; |