vim-patch:8.2.4934: string interpolation fails when not evaluating

Problem:    String interpolation fails when not evaluating.
Solution:   Skip the expression when not evaluating. (closes vim/vim#10398)

70c41241c2

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-04-15 18:19:47 +08:00
parent ef9af89da7
commit 29efd54e02
4 changed files with 15 additions and 16 deletions

View File

@@ -4140,7 +4140,7 @@ int eval_interp_string(char **arg, typval_T *rettv, bool evaluate)
(*arg)++;
break;
}
char *p = eval_one_expr_in_str(*arg, &ga);
char *p = eval_one_expr_in_str(*arg, &ga, evaluate);
if (p == NULL) {
ret = FAIL;
break;