diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-26 18:47:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-26 18:47:11 +0200 |
commit | 8f187fc6304222956f94a700758a490cc8c0af99 (patch) | |
tree | 7532ab234cb857762f44e1b6bc48583f2c1aa38f /src/evalfunc.c | |
parent | 373863ed48c02b5df52574aa7d50aeecb1037d40 (diff) |
patch 8.2.1747: result of expand() unexpectedly depends on 'completeslash'v8.2.1747
Problem: Result of expand() unexpectedly depends on 'completeslash'.
Solution: Temporarily reset 'completeslash'. (Yasuhiro Matsumoto,
closes #7021)
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 57c4ffbce8..afc8977532 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -2436,6 +2436,12 @@ f_expand(typval_T *argvars, typval_T *rettv) expand_T xpc; int error = FALSE; char_u *result; +#ifdef BACKSLASH_IN_FILENAME + char_u *p_csl_save = p_csl; + + // avoid using 'completeslash' here + p_csl = empty_option; +#endif rettv->v_type = VAR_STRING; if (argvars[1].v_type != VAR_UNKNOWN @@ -2488,6 +2494,9 @@ f_expand(typval_T *argvars, typval_T *rettv) else rettv->vval.v_string = NULL; } +#ifdef BACKSLASH_IN_FILENAME + p_csl = p_csl_save; +#endif } /* |