summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-01-31 13:08:38 +0100
committerBram Moolenaar <Bram@vim.org>2021-01-31 13:08:38 +0100
commit3445320839a38b3b0c253513b125da8298ec27d6 (patch)
tree36de5f4e0a019c497710a3cfd6908a5fed0feed4 /runtime
parentf2b26bcf8f498fed72759af4aa768fb2aab3118c (diff)
patch 8.2.2435: setline() gives an error for some typesv8.2.2435
Problem: setline() gives an error for some types. Solution: Allow any type, convert each item to a string.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index edf5fc8cc3..1c4f46e6bb 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -1,4 +1,4 @@
-*eval.txt* For Vim version 8.2. Last change: 2021 Jan 22
+*eval.txt* For Vim version 8.2. Last change: 2021 Jan 31
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -293,13 +293,13 @@ is not available it returns zero or the default value you specify: >
List concatenation ~
-
+ *list-concatenation*
Two lists can be concatenated with the "+" operator: >
:let longlist = mylist + [5, 6]
:let mylist += [7, 8]
-To prepend or append an item turn the item into a list by putting [] around
-it. To change a list in-place see |list-modification| below.
+To prepend or append an item, turn the item into a list by putting [] around
+it. To change a list in-place, refer to |list-modification| below.
Sublist ~
@@ -3133,6 +3133,7 @@ append({lnum}, {text}) *append()*
text line below line {lnum} in the current buffer.
Otherwise append {text} as one text line below line {lnum} in
the current buffer.
+ Any type of item is accepted and converted to a String.
{lnum} can be zero to insert a line before the first one.
Returns 1 for failure ({lnum} out of range or out of memory),
0 for success. Example: >
@@ -9409,6 +9410,8 @@ setline({lnum}, {text}) *setline()*
{lnum} is used like with |getline()|.
When {lnum} is just below the last line the {text} will be
added below the last line.
+ {text} can be any type or a List of any type, each item is
+ converted to a String.
If this succeeds, FALSE is returned. If this fails (most likely
because {lnum} is invalid) TRUE is returned.