summaryrefslogtreecommitdiff
path: root/runtime/doc/textprop.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/textprop.txt')
-rw-r--r--runtime/doc/textprop.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/runtime/doc/textprop.txt b/runtime/doc/textprop.txt
index 5a849fed6..4aa00acae 100644
--- a/runtime/doc/textprop.txt
+++ b/runtime/doc/textprop.txt
@@ -225,7 +225,7 @@ prop_add({lnum}, {col}, {props})
GetLnum()->prop_add(col, props)
<
*prop_add_list()*
-prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
+prop_add_list({props}, [{item}, ...])
Similar to prop_add(), but attaches a text property at
multiple positions in a buffer.
@@ -237,12 +237,18 @@ prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
type name of the text property type
All fields except "type" are optional.
- The second argument is a List of Lists where each list
- specifies the starting and ending position of the text. The
- first two items {lnum} and {col} specify the starting position
- of the text where the property will be attached and the last
- two items {end-lnum} and {end-col} specify the position just
- after the text.
+ The second argument is a List of items, where each {item} is a
+ list that specifies the starting and ending position of the
+ text: [{lnum}, {col}, {end-lnum}, {end-col}]
+ or: [{lnum}, {col}, {end-lnum}, {end-col}, {id}]
+
+ The first two items {lnum} and {col} specify the starting
+ position of the text where the property will be attached.
+ The next two items {end-lnum} and {end-col} specify the
+ position just after the text.
+ An optional fifth item {id} can be used to give a different ID
+ to a property. When omitted the ID from {props} is used,
+ falling back to zero if none are present.
It is not possible to add a text property with a "text" field
here.