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".
diff --git a/src/eval.c b/src/eval.c
index b4cb385..860bc35 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7825,10 +7825,10 @@
{
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";
diff --git a/src/testdir/test_viml.vim b/src/testdir/test_viml.vim
index 502cd73..522515c 100644
--- a/src/testdir/test_viml.vim
+++ b/src/testdir/test_viml.vim
@@ -942,10 +942,10 @@
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)
diff --git a/src/version.c b/src/version.c
index 5cca6e6..1ea136d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1168,
+/**/
1167,
/**/
1166,