Mercurial > vim
changeset 18348:9ea364ccf216 v8.1.2168
patch 8.1.2168: heredoc assignment not skipped in if block
Commit: https://github.com/vim/vim/commit/b1ba9abcb385b0a5355788a7eefef78ec68d2f65
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 16 23:34:42 2019 +0200
patch 8.1.2168: heredoc assignment not skipped in if block
Problem: Heredoc assignment not skipped in if block.
Solution: Check if "skip" is set. (closes https://github.com/vim/vim/issues/5063)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Oct 2019 23:45:03 +0200 |
parents | e4e6e0bfc526 |
children | 3d40532727b8 |
files | src/evalvars.c src/testdir/test_let.vim src/version.c |
diffstat | 3 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/evalvars.c +++ b/src/evalvars.c @@ -756,10 +756,13 @@ ex_let_const(exarg_T *eap, int is_const) if (l != NULL) { rettv_list_set(&rettv, l); - op[0] = '='; - op[1] = NUL; - (void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count, + if (!eap->skip) + { + op[0] = '='; + op[1] = NUL; + (void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count, is_const, op); + } clear_tv(&rettv); } }