Ken Takata wrote:

> After 7.4.1644 (sorry, it was my patch), string([a,a,a]) returns wrong
> result.  E.g.:
> 
>   :let a = {}
>   :echo string([a,a,a])
>   [{}, {...}, {...}]  " Expected: [{}, {}, {}]
> 
> string() should return a string which can be parsed by eval().
> 
> This is also related to the following topic:
> https://groups.google.com/d/topic/vim_dev/LfMh2WGpx2o/discussion
> 
> I wrote a patch for this:
> https://bitbucket.org/k_takata/vim-ktakata-mq/src/tip/fix-echo-and-string.patch
> 
> I refactored echo_string()/tv2string() and moved the common part to
> echo_string_core().

Thanks.

> I also added some tests into test_viml.vim, but they might be insufficient.
> (I'm not sure test_viml.vim is the best place to add these tests.)

We can always improve this later.

Unfortunately this change breaks test 107.
That's because of passing echo_style to list2string().  It doesn't work
to use the inverse of echo_style to decide to restore the copyID.  We
need a separate argument for that.  Since I wanted to see if that
actually works I already made the change.

test86 and test87 also fail, but it looks like that's because of the
improvement.  Thus I'll adjust the .ok files.

-- 
The technology involved in making anything invisible is so infinitely
complex that nine hundred and ninety-nine billion, nine hundred and
ninety-nine million, nine hundred and ninety-nine thousand, nine hundred
and ninety-nine times out of a trillion it is much simpler and more
effective just to take the thing away and do without it.
                -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// 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.

Raspunde prin e-mail lui