forked from aniani/vim
patch 9.0.0741: cannot specify an ID for each item with prop_add_list()
Problem: Cannot specify an ID for each item with prop_add_list(). (Sergey
Vlasov)
Solution: Add an optional fifth number to the item. (closes #11360)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user