Andy Wokula wrote:

> Strange bug and crash with :echo and lists,
> observed on gVim 7.1.283 (also gVim 7.0):
> 
> 
> let list = []
> call add(list, "abc")
> call add(list, "def")
> echo list[0]
> " ^ important
> let list = reverse(list)
> call add(list, "ghi")
> let left = list[: 1]
> let right = []
> 
> " echo list[0] list[1] list[2]
> " " ^ crash, when uncommented!
> 
> echo left list[2] right
> " ['abc', 'ghi'] ghi []           wrong
> 
> let left = list[: 1]
> 
> echo left list[2] right
> " ['def', 'abc'] ghi []           ok

I can reproduce it.  Also when it's shorter:

let list = []
call add(list, "abc")
call add(list, "def")
echo list[0]
let list = reverse(list)
call add(list, "ghi")
echo list[0] list[1] list[2]

I suspect the reference counter is wrong somewhere, possibly for the
first "echo" line.

-- 
What is the difference between a professional and an amateur?
The ark was built by an amateur; professionals gave us the Titanic.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui