Patch 7.4.1228
Problem: copy() and deepcopy() fail with special variables. (Nikolai
Pavlov)
Solution: Make it work. Add a test. Closes #614.
Files: src/eval.c, src/testdir/test_viml.vim
*** ../vim-7.4.1227/src/eval.c 2016-01-31 17:30:47.418544455 +0100
--- src/eval.c 2016-01-31 18:24:47.808998958 +0100
***************
*** 21939,21944 ****
--- 21939,21945 ----
#endif
case VAR_STRING:
case VAR_FUNC:
+ case VAR_SPECIAL:
copy_tv(from, to);
break;
case VAR_LIST:
*** ../vim-7.4.1227/src/testdir/test_viml.vim 2016-01-26 19:59:04.571324075
+0100
--- src/testdir/test_viml.vim 2016-01-31 18:26:30.447925824 +0100
***************
*** 1001,1006 ****
--- 1001,1016 ----
call assert_equal(v:none, eval(string(v:none)))
call assert_equal(v:null, eval(string(v:null)))
+ call assert_equal(v:false, copy(v:false))
+ call assert_equal(v:true, copy(v:true))
+ call assert_equal(v:none, copy(v:none))
+ call assert_equal(v:null, copy(v:null))
+
+ call assert_equal([v:false], deepcopy([v:false]))
+ call assert_equal([v:true], deepcopy([v:true]))
+ call assert_equal([v:none], deepcopy([v:none]))
+ call assert_equal([v:null], deepcopy([v:null]))
+
call assert_true(empty(v:false))
call assert_false(empty(v:true))
call assert_true(empty(v:null))
*** ../vim-7.4.1227/src/version.c 2016-01-31 18:08:30.279202960 +0100
--- src/version.c 2016-01-31 18:44:43.756474651 +0100
***************
*** 744,745 ****
--- 744,747 ----
{ /* Add new patch number below this line */
+ /**/
+ 1228,
/**/
--
I AM THANKFUL...
...for the taxes that I pay because it means that I am employed.
/// 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.