aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt15
-rw-r--r--runtime/doc/vim_diff.txt18
2 files changed, 32 insertions, 1 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index add2a13592..2951566ecb 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -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|.
diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt
index 3e18cdd762..de061d3828 100644
--- a/runtime/doc/vim_diff.txt
+++ b/runtime/doc/vim_diff.txt
@@ -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*