diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-02-16 16:20:21 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-02-16 16:20:21 +0100 |
commit | a76b31542e1d83b7d2fe7378439912e800a4d0f6 (patch) | |
tree | fc21552fe944ef502c71d083fa15602180b49c7c /src/testdir/test_expr.vim | |
parent | a36c830a32f439b862ffb85d4c4b4799ee5ea2f9 (diff) | |
download | vim-git-a76b31542e1d83b7d2fe7378439912e800a4d0f6.tar.gz |
patch 8.2.0265: "eval" after "if 0" doesn't check for following commandv8.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)
Diffstat (limited to 'src/testdir/test_expr.vim')
-rw-r--r-- | src/testdir/test_expr.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index bd9cacafa..1281ae72f 100644 --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -530,3 +530,12 @@ func Test_broken_number() 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 |