comparison src/evalfunc.c @ 22397:0a5770061295 v8.2.1747

patch 8.2.1747: result of expand() unexpectedly depends on 'completeslash' Commit: https://github.com/vim/vim/commit/8f187fc6304222956f94a700758a490cc8c0af99 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 26 18:47:11 2020 +0200 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 #7021)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Sep 2020 19:00:03 +0200
parents 770fe121ca64
children 0ef3ae4ec70e
comparison
equal deleted inserted replaced
22396:44cb9b1dc1ed 22397:0a5770061295
2434 char *errormsg; 2434 char *errormsg;
2435 int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND; 2435 int options = WILD_SILENT|WILD_USE_NL|WILD_LIST_NOTFOUND;
2436 expand_T xpc; 2436 expand_T xpc;
2437 int error = FALSE; 2437 int error = FALSE;
2438 char_u *result; 2438 char_u *result;
2439 #ifdef BACKSLASH_IN_FILENAME
2440 char_u *p_csl_save = p_csl;
2441
2442 // avoid using 'completeslash' here
2443 p_csl = empty_option;
2444 #endif
2439 2445
2440 rettv->v_type = VAR_STRING; 2446 rettv->v_type = VAR_STRING;
2441 if (argvars[1].v_type != VAR_UNKNOWN 2447 if (argvars[1].v_type != VAR_UNKNOWN
2442 && argvars[2].v_type != VAR_UNKNOWN 2448 && argvars[2].v_type != VAR_UNKNOWN
2443 && tv_get_bool_chk(&argvars[2], &error) 2449 && tv_get_bool_chk(&argvars[2], &error)
2486 } 2492 }
2487 } 2493 }
2488 else 2494 else
2489 rettv->vval.v_string = NULL; 2495 rettv->vval.v_string = NULL;
2490 } 2496 }
2497 #ifdef BACKSLASH_IN_FILENAME
2498 p_csl = p_csl_save;
2499 #endif
2491 } 2500 }
2492 2501
2493 /* 2502 /*
2494 * "expandcmd()" function 2503 * "expandcmd()" function
2495 * Expand all the special characters in a command string. 2504 * Expand all the special characters in a command string.