vim-patch:8.2.4840: heredoc expression evaluated even when skipping

Problem:    Heredoc expression evaluated even when skipping.
Solution:   Don't evaluate when "skip" is set. (closes vim/vim#10306)

05c7f5d3d0

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2023-04-14 21:06:15 +08:00
parent 3c16e75ae1
commit 2cf8f01e7d
2 changed files with 14 additions and 1 deletions

View File

@@ -227,7 +227,7 @@ static list_T *heredoc_get(exarg_T *eap, char *cmd)
}
char *str = theline + ti;
if (evalstr) {
if (evalstr && !eap->skip) {
str = eval_all_expr_in_str(str);
if (str == NULL) {
// expression evaluation failed