Skip to content

Commit f48aa16

Browse files
committed
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".
1 parent 0436922 commit f48aa16

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

src/eval.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7825,10 +7825,10 @@ get_var_special_name(int nr)
78257825
{
78267826
switch (nr)
78277827
{
7828-
case VVAL_FALSE: return "false";
7829-
case VVAL_TRUE: return "true";
7830-
case VVAL_NONE: return "none";
7831-
case VVAL_NULL: return "null";
7828+
case VVAL_FALSE: return "v:false";
7829+
case VVAL_TRUE: return "v:true";
7830+
case VVAL_NONE: return "v:none";
7831+
case VVAL_NULL: return "v:null";
78327832
}
78337833
EMSG2(_(e_intern2), "get_var_special_name()");
78347834
return "42";

src/testdir/test_viml.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -942,10 +942,10 @@ func Test_type()
942942
call assert_equal(0, 0 + v:none)
943943
call assert_equal(0, 0 + v:null)
944944

945-
call assert_equal('false', '' . v:false)
946-
call assert_equal('true', '' . v:true)
947-
call assert_equal('none', '' . v:none)
948-
call assert_equal('null', '' . v:null)
945+
call assert_equal('v:false', '' . v:false)
946+
call assert_equal('v:true', '' . v:true)
947+
call assert_equal('v:none', '' . v:none)
948+
call assert_equal('v:null', '' . v:null)
949949

950950
call assert_true(v:false == 0)
951951
call assert_false(v:false != 0)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ static char *(features[]) =
741741

742742
static int included_patches[] =
743743
{ /* Add new patch number below this line */
744+
/**/
745+
1168,
744746
/**/
745747
1167,
746748
/**/

0 commit comments

Comments
 (0)