diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-10-26 18:42:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 18:42:19 -0400 |
commit | b6897ebc0c623d0a74c221c3030c7eaf17b7e151 (patch) | |
tree | 87aafbbea8cc03bc9250f2710f1dd2e1971af01f /src/nvim/edit.c | |
parent | a22fe09b90a52f451d9fd8d3372b8c390dd1dc1a (diff) | |
parent | 6a0cb2a948cd7b523a2dc545b165acf6f44d10fb (diff) | |
download | rneovim-b6897ebc0c623d0a74c221c3030c7eaf17b7e151.tar.gz rneovim-b6897ebc0c623d0a74c221c3030c7eaf17b7e151.tar.bz2 rneovim-b6897ebc0c623d0a74c221c3030c7eaf17b7e151.zip |
Merge pull request #13116 from skippi/vim-8.1.1769
vim-patch:8.1.{1769, 1772, 1791},8.2.{1747}
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index b3261cfce6..ac0e6cc9f6 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -4171,6 +4171,21 @@ static int ins_compl_get_exp(pos_T *ini) EW_FILE|EW_DIR|EW_ADDSLASH|EW_SILENT) == OK) { // May change home directory back to "~". tilde_replace(compl_pattern, num_matches, matches); +#ifdef BACKSLASH_IN_FILENAME + if (curbuf->b_p_csl[0] != NUL) { + for (int 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 += utfc_ptr2len(ptr); + } + } + } +#endif ins_compl_add_matches(num_matches, matches, p_fic || p_wic); } break; |