mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.2.0265: "eval" after "if 0" doesn't check for following command
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 vim/vim#5640)
a76b31542e
This commit is contained in:
parent
b34dc4c458
commit
eb93399d70
@ -1857,6 +1857,7 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
||||
case CMD_echoerr:
|
||||
case CMD_echomsg:
|
||||
case CMD_echon:
|
||||
case CMD_eval:
|
||||
case CMD_execute:
|
||||
case CMD_filter:
|
||||
case CMD_help:
|
||||
|
@ -501,3 +501,12 @@ func Test_empty_concatenate()
|
||||
call assert_equal('b', 'a'[4:0] . 'b')
|
||||
call assert_equal('b', 'b' . 'a'[4:0])
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user