Skip to content

Commit 99065f8

Browse files
committed
👍 Update type definition for prop_add_list
1 parent 88768ae commit 99065f8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

denops_std/function/vim/prop_add_list.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,41 @@ export type PropAddListProps = {
66
type: string;
77
};
88

9-
export type PropAddListItem = [number, number, number, number];
9+
export type PropAddListItem = [
10+
lnum: number,
11+
col: number,
12+
end_lnum: number,
13+
end_col: number,
14+
];
1015

1116
/**
1217
* Similar to prop_add(), but attaches a text property at
1318
* multiple positions in a buffer.
19+
*
1420
* {props} is a dictionary with these fields:
1521
* bufnr buffer to add the property to; when omitted
1622
* the current buffer is used
1723
* id user defined ID for the property; must be a
1824
* number; when omitted zero is used
1925
* type name of the text property type
2026
* All fields except "type" are optional.
27+
*
2128
* The second argument is a List of Lists where each list
2229
* specifies the starting and ending position of the text. The
2330
* first two items {lnum} and {col} specify the starting position
2431
* of the text where the property will be attached and the last
2532
* two items {end-lnum} and {end-col} specify the position just
2633
* after the text.
34+
*
35+
* It is not possible to add a text property with a "text" field
36+
* here.
37+
*
2738
* Example:
2839
* call prop_add_list(#{type: 'MyProp', id: 2},
2940
* \ [[1, 4, 1, 7],
3041
* \ [1, 15, 1, 20],
3142
* \ [2, 30, 3, 30]]
43+
*
3244
* Can also be used as a |method|:
3345
* GetProp()->prop_add_list([[1, 1, 1, 2], [1, 4, 1, 8]])
3446
*/

0 commit comments

Comments
 (0)