diff options
-rw-r--r-- | src/eval.c | 4 | ||||
-rw-r--r-- | src/testdir/test_viml.vim | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index d08269fc92..359956be1a 100644 --- a/src/eval.c +++ b/src/eval.c @@ -10578,6 +10578,10 @@ f_empty(argvars, rettv) n = argvars[0].vval.v_dict == NULL || argvars[0].vval.v_dict->dv_hashtab.ht_used == 0; break; + case VAR_SPECIAL: + n = argvars[0].vval.v_number != VVAL_TRUE; + break; + default: EMSG2(_(e_intern2), "f_empty()"); n = 0; diff --git a/src/testdir/test_viml.vim b/src/testdir/test_viml.vim index f32331a61c..6b2b6b988b 100644 --- a/src/testdir/test_viml.vim +++ b/src/testdir/test_viml.vim @@ -987,6 +987,11 @@ func Test_type() call assert_equal(v:true, eval(string(v:true))) call assert_equal(v:none, eval(string(v:none))) call assert_equal(v:null, eval(string(v:null))) + + call assert_true(empty(v:false)) + call assert_false(empty(v:true)) + call assert_true(empty(v:null)) + call assert_true(empty(v:none)) endfunc "------------------------------------------------------------------------------- diff --git a/src/version.c b/src/version.c index 298372e837..0a0bc1d179 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1178, +/**/ 1177, /**/ 1176, |