vim-patch:8.2.4841: empty string considered an error for expand()

Problem:    Empty string considered an error for expand() when 'verbose' is
            set. (Christian Brabandt)
Solution:   Do not give an error for an empty result. (closes vim/vim#10307)
a96edb736d
This commit is contained in:
zeertzjq
2022-08-23 13:24:40 +08:00
parent d0b9fe2d5a
commit f1b8683b8c
4 changed files with 20 additions and 13 deletions

View File

@@ -1982,7 +1982,7 @@ static void f_expand(typval_T *argvars, typval_T *rettv, FunPtr fptr)
}
size_t len;
char *errormsg = NULL;
char_u *result = eval_vars((char_u *)s, (char_u *)s, &len, NULL, &errormsg, NULL);
char_u *result = eval_vars((char_u *)s, (char_u *)s, &len, NULL, &errormsg, NULL, false);
if (p_verbose == 0) {
emsg_off--;
} else if (errormsg != NULL) {