Patch 7.4.1178
Problem: empty() doesn't work for the new special variables.
Solution: Make empty() work. (Damien)
Files: src/eval.c, src/testdir/test_viml.vim
*** ../vim-7.4.1177/src/eval.c 2016-01-24 20:36:18.858082431 +0100
--- src/eval.c 2016-01-25 20:18:27.532956100 +0100
***************
*** 10578,10583 ****
--- 10578,10587 ----
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;
*** ../vim-7.4.1177/src/testdir/test_viml.vim 2016-01-24 21:51:52.834704297
+0100
--- src/testdir/test_viml.vim 2016-01-25 20:18:54.688675592 +0100
***************
*** 987,992 ****
--- 987,997 ----
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
"-------------------------------------------------------------------------------
*** ../vim-7.4.1177/src/version.c 2016-01-25 20:15:40.178684778 +0100
--- src/version.c 2016-01-25 20:20:00.947991189 +0100
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 1178,
/**/
--
It was recently discovered that research causes cancer in rats.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.