summaryrefslogtreecommitdiff
path: root/src/ex_getln.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 471479c2c..7ef304ddb 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -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;
}