To: vim_dev@googlegroups.com Subject: Patch 7.4.1228 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- 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 ///