summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-06-06 21:04:07 +0200
committerBram Moolenaar <Bram@vim.org>2018-06-06 21:04:07 +0200
commitca851593a660f08aba5c134f90c238d4a3e983e6 (patch)
tree363e4fc7ee646a53d869cb941e09feadc0dd46dc /runtime
parent891e1fd894720d0b99a9daefa41e8181844f819a (diff)
patch 8.1.0037: cannot easily append lines to another bufferv8.1.0037
Problem: Cannot easily append lines to another buffer. Solution: Add appendbufline().
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/eval.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index 7d214c11aa..1c56bf3417 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -2560,6 +2560,21 @@ append({lnum}, {expr}) *append()*
0 for success. Example: >
:let failed = append(line('$'), "# THE END")
:let failed = append(0, ["Chapter 1", "the beginning"])
+
+appendbufline({expr}, {lnum}, {text}) *appendbufline()*
+ Like |append()| but append the text in buffer {expr}.
+
+ For the use of {expr}, see |bufname()|.
+
+ {lnum} is used like with |append()|. Note that using |line()|
+ would use the current buffer, not the one appending to.
+ Use "$" to append at the end of the buffer.
+
+ On success 0 is returned, on failure 1 is returned.
+
+ If {expr} is not a valid buffer or {lnum} is not valid, an
+ error message is given. Example: >
+ :let failed = appendbufline(13, 0, "# THE START")
<
*argc()*
argc() The result is the number of files in the argument list of the