|
Karsten Hopp |
c1700b |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
c1700b |
Subject: Patch 7.3.516
|
|
Karsten Hopp |
c1700b |
Fcc: outbox
|
|
Karsten Hopp |
c1700b |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
c1700b |
Mime-Version: 1.0
|
|
Karsten Hopp |
c1700b |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
c1700b |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
c1700b |
------------
|
|
Karsten Hopp |
c1700b |
|
|
Karsten Hopp |
c1700b |
Patch 7.3.516
|
|
Karsten Hopp |
c1700b |
Problem: extend(o, o) may crash Vim.
|
|
Karsten Hopp |
c1700b |
Solution: Fix crash and add test. (Thinca and Hirohito Higashi)
|
|
Karsten Hopp |
c1700b |
Files: src/eval.c, src/testdir/test55.in, src/testdir/test55.ok
|
|
Karsten Hopp |
c1700b |
|
|
Karsten Hopp |
c1700b |
|
|
Karsten Hopp |
c1700b |
*** ../vim-7.3.515/src/eval.c 2012-04-30 17:35:44.000000000 +0200
|
|
Karsten Hopp |
c1700b |
--- src/eval.c 2012-05-18 12:02:44.000000000 +0200
|
|
Karsten Hopp |
c1700b |
***************
|
|
Karsten Hopp |
c1700b |
*** 10191,10197 ****
|
|
Karsten Hopp |
c1700b |
EMSG2(_("E737: Key already exists: %s"), hi2->hi_key);
|
|
Karsten Hopp |
c1700b |
break;
|
|
Karsten Hopp |
c1700b |
}
|
|
Karsten Hopp |
c1700b |
! else if (*action == 'f')
|
|
Karsten Hopp |
c1700b |
{
|
|
Karsten Hopp |
c1700b |
clear_tv(&di1->di_tv);
|
|
Karsten Hopp |
c1700b |
copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv);
|
|
Karsten Hopp |
c1700b |
--- 10191,10197 ----
|
|
Karsten Hopp |
c1700b |
EMSG2(_("E737: Key already exists: %s"), hi2->hi_key);
|
|
Karsten Hopp |
c1700b |
break;
|
|
Karsten Hopp |
c1700b |
}
|
|
Karsten Hopp |
c1700b |
! else if (*action == 'f' && HI2DI(hi2) != di1)
|
|
Karsten Hopp |
c1700b |
{
|
|
Karsten Hopp |
c1700b |
clear_tv(&di1->di_tv);
|
|
Karsten Hopp |
c1700b |
copy_tv(&HI2DI(hi2)->di_tv, &di1->di_tv);
|
|
Karsten Hopp |
c1700b |
*** ../vim-7.3.515/src/testdir/test55.in 2010-11-10 20:31:24.000000000 +0100
|
|
Karsten Hopp |
c1700b |
--- src/testdir/test55.in 2012-05-18 11:57:23.000000000 +0200
|
|
Karsten Hopp |
c1700b |
***************
|
|
Karsten Hopp |
c1700b |
*** 352,357 ****
|
|
Karsten Hopp |
c1700b |
--- 352,375 ----
|
|
Karsten Hopp |
c1700b |
:let dict4copy = deepcopy(dict4)
|
|
Karsten Hopp |
c1700b |
:$put =(l == lcopy)
|
|
Karsten Hopp |
c1700b |
:$put =(dict4 == dict4copy)
|
|
Karsten Hopp |
c1700b |
+ :"
|
|
Karsten Hopp |
c1700b |
+ :" Pass the same List to extend()
|
|
Karsten Hopp |
c1700b |
+ :let l = [1, 2, 3, 4, 5]
|
|
Karsten Hopp |
c1700b |
+ :call extend(l, l)
|
|
Karsten Hopp |
c1700b |
+ :$put =string(l)
|
|
Karsten Hopp |
c1700b |
+ :"
|
|
Karsten Hopp |
c1700b |
+ :" Pass the same Dict to extend()
|
|
Karsten Hopp |
c1700b |
+ :let d = { 'a': {'b': 'B'}}
|
|
Karsten Hopp |
c1700b |
+ :call extend(d, d)
|
|
Karsten Hopp |
c1700b |
+ :$put =string(d)
|
|
Karsten Hopp |
c1700b |
+ :"
|
|
Karsten Hopp |
c1700b |
+ :" Pass the same Dict to extend() with "error"
|
|
Karsten Hopp |
c1700b |
+ :try
|
|
Karsten Hopp |
c1700b |
+ : call extend(d, d, "error")
|
|
Karsten Hopp |
c1700b |
+ :catch
|
|
Karsten Hopp |
c1700b |
+ : $put =v:exception[:15] . v:exception[-1:-1]
|
|
Karsten Hopp |
c1700b |
+ :endtry
|
|
Karsten Hopp |
c1700b |
+ :$put =string(d)
|
|
Karsten Hopp |
c1700b |
:endfun
|
|
Karsten Hopp |
c1700b |
:"
|
|
Karsten Hopp |
c1700b |
:call Test(1, 2, [3, 4], {5: 6}) " This may take a while
|
|
Karsten Hopp |
c1700b |
*** ../vim-7.3.515/src/testdir/test55.ok 2010-11-10 20:31:24.000000000 +0100
|
|
Karsten Hopp |
c1700b |
--- src/testdir/test55.ok 2012-05-18 11:57:01.000000000 +0200
|
|
Karsten Hopp |
c1700b |
***************
|
|
Karsten Hopp |
c1700b |
*** 111,113 ****
|
|
Karsten Hopp |
c1700b |
--- 111,117 ----
|
|
Karsten Hopp |
c1700b |
0
|
|
Karsten Hopp |
c1700b |
1
|
|
Karsten Hopp |
c1700b |
1
|
|
Karsten Hopp |
c1700b |
+ [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]
|
|
Karsten Hopp |
c1700b |
+ {'a': {'b': 'B'}}
|
|
Karsten Hopp |
c1700b |
+ Vim(call):E737: a
|
|
Karsten Hopp |
c1700b |
+ {'a': {'b': 'B'}}
|
|
Karsten Hopp |
c1700b |
*** ../vim-7.3.515/src/version.c 2012-04-30 21:09:38.000000000 +0200
|
|
Karsten Hopp |
c1700b |
--- src/version.c 2012-05-18 12:04:54.000000000 +0200
|
|
Karsten Hopp |
c1700b |
***************
|
|
Karsten Hopp |
c1700b |
*** 716,717 ****
|
|
Karsten Hopp |
c1700b |
--- 716,719 ----
|
|
Karsten Hopp |
c1700b |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
c1700b |
+ /**/
|
|
Karsten Hopp |
c1700b |
+ 516,
|
|
Karsten Hopp |
c1700b |
/**/
|
|
Karsten Hopp |
c1700b |
|
|
Karsten Hopp |
c1700b |
--
|
|
Karsten Hopp |
c1700b |
I used to wonder about the meaning of life. But I looked it
|
|
Karsten Hopp |
c1700b |
up in the dictionary under "L" and there it was - the meaning
|
|
Karsten Hopp |
c1700b |
of life. It was less than I expected. - Dogbert
|
|
Karsten Hopp |
c1700b |
|
|
Karsten Hopp |
c1700b |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
c1700b |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
c1700b |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
c1700b |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|