Tuesday, December 10, 2013

Re: Does viminfo store nested lists?

On Tue, December 10, 2013 13:24, Marc Weber wrote:
> Have you tried cyclic linked lists/ dictionaries like these samples ?
>
> fun! CyclicDictionary(count)
> let start = {}
> let prev = start
> for i in range(1, a:count)
> let new_ = {'prev': prev}
> endfor
> let start.prev = new_
>
> return start
> endf
>
>
> fun! CyclicList(count)
> let lists = map(range(0,a:count-1), '[]')
>
> for i in range(0, a:count-1)
> call add(lists[i], lists[(i+1) % a:count])
> call add(lists[i], lists[(i-1+a:count) % a:count])
> endfor
> return lists[0]
> endf
>
> let dict = CyclicDictionary(100000)
> let list = CyclicList(100000)
>
> if dict and list are both read back correctly neither size nor cycles
> seem to be a problem ..

Oh wow, simply sourcing that in my Windows gvim (7.4.0) crashes it.

(don't have a Windows development system here to analyze it or even
create a patch. Perhaps someone else can find the problem).

Best,
Christian

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment