From 2e4465e0585053bddaf8e6e60dc50bf1be0ba54e Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Mon, 21 Oct 2019 02:17:25 +0200 Subject: vim-patch:8.1.2168: heredoc not skipped in if-block #11265 Problem: Heredoc assignment not skipped in if block. Solution: Check if "skip" is set. https://github.com/vim/vim/commit/b1ba9abcb385b0a5355788a7eefef78ec68d2f65 Fixes https://github.com/neovim/neovim/issues/11264 --- src/nvim/eval.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/nvim/eval.c') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index fd37e1001a..71ffb26cc2 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -1675,10 +1675,12 @@ static void ex_let_const(exarg_T *eap, const bool is_const) list_T *l = heredoc_get(eap, expr + 3); if (l != NULL) { tv_list_set_ret(&rettv, l); - op[0] = '='; - op[1] = NUL; - (void)ex_let_vars(eap->arg, &rettv, false, semicolon, var_count, - is_const, op); + if (!eap->skip) { + op[0] = '='; + op[1] = NUL; + (void)ex_let_vars(eap->arg, &rettv, false, semicolon, var_count, + is_const, op); + } tv_clear(&rettv); } } else { -- cgit