Patch 8.1.2168

7 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 16, 2019, 5:35:13 PM10/16/19
to vim...@googlegroups.com

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 -- Br...@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 ///
Reply all
Reply to author
Forward
0 new messages