diff options
author | Marco Hinz <mh.codebro@gmail.com> | 2019-10-21 02:17:25 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-10-20 17:17:25 -0700 |
commit | 2e4465e0585053bddaf8e6e60dc50bf1be0ba54e (patch) | |
tree | 305e281abd09abeb60edc3f770f59bf7fa5d5099 /src/nvim/eval.c | |
parent | 6fd6f4683d19d5ca18f48c1d1f0d87113e80368e (diff) | |
download | rneovim-2e4465e0585053bddaf8e6e60dc50bf1be0ba54e.tar.gz rneovim-2e4465e0585053bddaf8e6e60dc50bf1be0ba54e.tar.bz2 rneovim-2e4465e0585053bddaf8e6e60dc50bf1be0ba54e.zip |
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
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 { |