To: vim_dev@googlegroups.com Subject: Patch 8.1.2168 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.1.2168 Problem: Heredoc assignment not skipped in if block. Solution: Check if "skip" is set. (closes #5063) Files: src/evalvars.c, src/testdir/test_let.vim *** ../vim-8.1.2167/src/evalvars.c 2019-09-05 22:33:23.268963478 +0200 --- src/evalvars.c 2019-10-16 22:50:55.759743711 +0200 *************** *** 756,765 **** if (l != NULL) { rettv_list_set(&rettv, l); ! op[0] = '='; ! op[1] = NUL; ! (void)ex_let_vars(eap->arg, &rettv, FALSE, semicolon, var_count, is_const, op); clear_tv(&rettv); } } --- 756,768 ---- if (l != NULL) { rettv_list_set(&rettv, l); ! 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); } } *** ../vim-8.1.2167/src/testdir/test_let.vim 2019-07-21 23:04:14.079123854 +0200 --- src/testdir/test_let.vim 2019-10-16 22:53:53.243167740 +0200 *************** *** 295,298 **** --- 295,306 ---- app END call assert_equal(['something', 'app'], var1) + + let check = [] + if 0 + let check =<< trim END + from heredoc + END + endif + call assert_equal([], check) endfunc *** ../vim-8.1.2167/src/version.c 2019-10-16 23:33:09.214421043 +0200 --- src/version.c 2019-10-16 23:34:08.678384618 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 2168, /**/ -- A disclaimer for the disclaimer: "and before I get a huge amount of complaints , I have no control over the disclaimer at the end of this mail :-)" (Timothy Aldrich) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///