mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 20:08:17 +00: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:
@@ -1857,6 +1857,7 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|
|||||||
case CMD_echoerr:
|
case CMD_echoerr:
|
||||||
case CMD_echomsg:
|
case CMD_echomsg:
|
||||||
case CMD_echon:
|
case CMD_echon:
|
||||||
|
case CMD_eval:
|
||||||
case CMD_execute:
|
case CMD_execute:
|
||||||
case CMD_filter:
|
case CMD_filter:
|
||||||
case CMD_help:
|
case CMD_help:
|
||||||
|
@@ -501,3 +501,12 @@ func Test_empty_concatenate()
|
|||||||
call assert_equal('b', 'a'[4:0] . 'b')
|
call assert_equal('b', 'a'[4:0] . 'b')
|
||||||
call assert_equal('b', 'b' . 'a'[4:0])
|
call assert_equal('b', 'b' . 'a'[4:0])
|
||||||
endfunc
|
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
|
||||||
|
Reference in New Issue
Block a user