1
0
forked from aniani/vim

patch 7.4.1271

Problem:    assert_false(v:false) reports an error. (Nikolai Pavlov)
Solution:   Recognize v:true and v:false. (Closes #625)
This commit is contained in:
Bram Moolenaar
2016-02-06 20:29:28 +01:00
parent 81e7a9c3fb
commit 3712792637
3 changed files with 7 additions and 0 deletions

View File

@@ -9216,6 +9216,9 @@ assert_bool(typval_T *argvars, int isTrue)
int error = FALSE;
garray_T ga;
if (argvars[0].v_type == VAR_SPECIAL
&& argvars[0].vval.v_number == (isTrue ? VVAL_TRUE : VV_FALSE))
return;
if (argvars[0].v_type != VAR_NUMBER
|| (get_tv_number_chk(&argvars[0], &error) == 0) == isTrue
|| error)