From 089f4f8e4a297aa8e7c689331ffd16ffe415120a Mon Sep 17 00:00:00 2001 From: skippi Date: Sun, 18 Oct 2020 21:36:30 -0500 Subject: vim-patch:8.1.1769: 'shellslash' is also used for completion Problem: 'shellslash' is also used for completion. Solution: Add the 'completeslash' option. (Yasuhiro Matsumoto, closes vim/vim#3612) https://github.com/vim/vim/commit/ac3150d385e6e3f3fe76642aac3cda954d30583f --- src/nvim/ex_getln.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nvim/ex_getln.c') diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 940f446a7b..c56adc8bd4 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -5052,6 +5052,21 @@ ExpandFromContext ( ret = expand_wildcards_eval(&pat, num_file, file, flags); if (free_pat) xfree(pat); +#ifdef BACKSLASH_IN_FILENAME + if (p_csl[0] != NUL) { + for (int i = 0; i < *num_file; i++) { + char_u *ptr = (*file)[i]; + while (*ptr != NUL) { + if (p_csl[0] == 's' && *ptr == '\\') { + *ptr = '/'; + } else if (p_csl[0] == 'b' && *ptr == '/') { + *ptr = '\\'; + } + ptr += utfc_ptr2len(ptr); + } + } + } +#endif return ret; } -- cgit