eval/string(): Share code between msgpackdump() and string()+:echo

This commit is contained in:
ZyX 2015-09-20 18:04:33 +03:00
parent 0be94d1e5a
commit b6fdb7bd0f
3 changed files with 764 additions and 652 deletions

View File

@ -7809,7 +7809,20 @@ This does NOT work: >
postponed until you type something), force a redraw
with the |:redraw| command. Example: >
:new | redraw | echo "there is a new window"
<
< *:echo-self-refer*
When printing nested containers echo prints second
occurrence of the self-referencing container using
"[...@level]" (self-referencing |List|) or
"{...@level}" (self-referencing |Dict|): >
:let l = []
:call add(l, l)
:let l2 = []
:call add(l2, [l2])
:echo l l2
< echoes "[[...@0]] [[[...@0]]]". Echoing "[l]" will
echo "[[[...@1]]]" because l first occurs at second
level.
*:echon*
:echon {expr1} .. Echoes each {expr1}, without anything added. Also see
|:comment|.

View File

@ -75,6 +75,24 @@ are always available and may be used simultaneously in separate plugins. The
'encoding' cannot be changed after startup.
|string()| and |:echo| behaviour changed:
1. No maximum recursion depth limit is applied to nested container
structures.
2. |string()| fails immediately on nested containers, not when recursion limit
was exceeded.
2. When |:echo| encounters duplicate containers like >
let l = []
echo [l, l]
<
it does not use "[...]" (was: "[[], [...]]", now: "[[], []]"). "..." is
only used for recursive containers.
3. |:echo| printing nested containers adds "@level" after "..." designating
the level at which recursive container was printed: |:echo-self-refer|.
Same thing applies to |string()| (though it uses construct like
"{E724@level}"), but this is not reliable because |string()| continues to
error out.
==============================================================================
4. New Features *nvim-features-new*

File diff suppressed because it is too large Load Diff