diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-07-28 16:36:39 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-07-28 16:36:39 +0200 |
commit | ac3150d385e6e3f3fe76642aac3cda954d30583f (patch) | |
tree | 1ef511ccde68ed948d811eb04a69303d1ccea50c /src/insexpand.c | |
parent | bca9c301936c9ba4ee67528f81393debf83844b9 (diff) |
patch 8.1.1769: 'shellslash' is also used for completionv8.1.1769
Problem: 'shellslash' is also used for completion.
Solution: Add the 'completeslash' option. (Yasuhiro Matsumoto, closes #3612)
Diffstat (limited to 'src/insexpand.c')
-rw-r--r-- | src/insexpand.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/insexpand.c b/src/insexpand.c index fe475a5da6..42458005ed 100644 --- a/src/insexpand.c +++ b/src/insexpand.c @@ -2669,6 +2669,26 @@ ins_compl_get_exp(pos_T *ini) // May change home directory back to "~". tilde_replace(compl_pattern, num_matches, matches); +#ifdef BACKSLASH_IN_FILENAME + if (curbuf->b_p_csl[0] != NUL) + { + int i; + + for (i = 0; i < num_matches; ++i) + { + char_u *ptr = matches[i]; + + while (*ptr != NUL) + { + if (curbuf->b_p_csl[0] == 's' && *ptr == '\\') + *ptr = '/'; + else if (curbuf->b_p_csl[0] == 'b' && *ptr == '/') + *ptr = '\\'; + ptr += (*mb_ptr2len)(ptr); + } + } + } +#endif ins_compl_add_matches(num_matches, matches, p_fic || p_wic); } break; |