mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
vim-patch:8.2.1747: result of expand() unexpectedly depends on 'completeslash'
Problem: Result of expand() unexpectedly depends on 'completeslash'.
Solution: Temporarily reset 'completeslash'. (Yasuhiro Matsumoto,
closes vim/vim#7021)
8f187fc630
This commit is contained in:
@@ -2071,6 +2071,12 @@ static void f_expand(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
expand_T xpc;
|
||||
bool 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
|
||||
@@ -2123,6 +2129,9 @@ static void f_expand(typval_T *argvars, typval_T *rettv, FunPtr fptr)
|
||||
rettv->vval.v_string = NULL;
|
||||
}
|
||||
}
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
p_csl = p_csl_save;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user