Patch 8.2.0265

7 views
Skip to first unread message

Bram Moolenaar

unread,
Feb 16, 2020, 10:22:21 AM2/16/20
to vim...@googlegroups.com

Patch 8.2.0265
Problem: "eval" after "if 0" doesn't check for following command.
Solution: Add "eval" to list of commands that check for a following command.
(closes #5640)
Files: src/ex_docmd.c, src/testdir/test_expr.vim


*** ../vim-8.2.0264/src/ex_docmd.c 2020-02-08 16:00:43.225362846 +0100
--- src/ex_docmd.c 2020-02-16 16:12:45.011560604 +0100
***************
*** 2375,2380 ****
--- 2375,2381 ----
case CMD_echoerr:
case CMD_echomsg:
case CMD_echon:
+ case CMD_eval:
case CMD_execute:
case CMD_filter:
case CMD_help:
*** ../vim-8.2.0264/src/testdir/test_expr.vim 2020-01-30 18:24:46.997204019 +0100
--- src/testdir/test_expr.vim 2020-02-16 16:10:24.220185548 +0100
***************
*** 530,532 ****
--- 530,541 ----
call assert_equal(2, str2nr('2a'))
call assert_fails('inoremap <Char-0b1z> b', 'E474:')
endfunc
+
+ func Test_eval_after_if()
+ let s:val = ''
+ func SetVal(x)
+ let s:val ..= a:x
+ endfunc
+ if 0 | eval SetVal('a') | endif | call SetVal('b')
+ call assert_equal('b', s:val)
+ endfunc
*** ../vim-8.2.0264/src/version.c 2020-02-16 15:08:23.295908252 +0100
--- src/version.c 2020-02-16 16:11:59.631786394 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 265,
/**/

--
From "know your smileys":
:-) Funny
|-) Funny Oriental
(-: Funny Australian

/// 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