0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 7.4.1168

Problem:    This doesn't give the right result: eval(string(v:true)). (Nikolay
            Pavlov)
Solution:   Make the string "v:true" instead of "true".
This commit is contained in:
Bram Moolenaar 2016-01-24 17:54:24 +01:00
parent 0436922965
commit f48aa160fd
3 changed files with 10 additions and 8 deletions

View File

@ -7825,10 +7825,10 @@ get_var_special_name(int nr)
{
switch (nr)
{
case VVAL_FALSE: return "false";
case VVAL_TRUE: return "true";
case VVAL_NONE: return "none";
case VVAL_NULL: return "null";
case VVAL_FALSE: return "v:false";
case VVAL_TRUE: return "v:true";
case VVAL_NONE: return "v:none";
case VVAL_NULL: return "v:null";
}
EMSG2(_(e_intern2), "get_var_special_name()");
return "42";

View File

@ -942,10 +942,10 @@ func Test_type()
call assert_equal(0, 0 + v:none)
call assert_equal(0, 0 + v:null)
call assert_equal('false', '' . v:false)
call assert_equal('true', '' . v:true)
call assert_equal('none', '' . v:none)
call assert_equal('null', '' . v:null)
call assert_equal('v:false', '' . v:false)
call assert_equal('v:true', '' . v:true)
call assert_equal('v:none', '' . v:none)
call assert_equal('v:null', '' . v:null)
call assert_true(v:false == 0)
call assert_false(v:false != 0)

View File

@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1168,
/**/
1167,
/**/