0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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 #3612)
This commit is contained in:
Bram Moolenaar
2019-07-28 16:36:39 +02:00
parent bca9c30193
commit ac3150d385
8 changed files with 146 additions and 4 deletions

View File

@@ -5095,6 +5095,26 @@ ExpandFromContext(
ret = expand_wildcards_eval(&pat, num_file, file, flags);
if (free_pat)
vim_free(pat);
#ifdef BACKSLASH_IN_FILENAME
if (p_csl[0] != NUL)
{
int i;
for (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 += (*mb_ptr2len)(ptr);
}
}
}
#endif
return ret;
}