Skip to content

Commit

Permalink
👍 Update type definition for prop_add_list
Browse files Browse the repository at this point in the history
  • Loading branch information
ryota2357 committed Apr 11, 2023
1 parent 88768ae commit 99065f8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion denops_std/function/vim/prop_add_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,41 @@ export type PropAddListProps = {
type: string;
};

export type PropAddListItem = [number, number, number, number];
export type PropAddListItem = [
lnum: number,
col: number,
end_lnum: number,
end_col: number,
];

/**
* Similar to prop_add(), but attaches a text property at
* multiple positions in a buffer.
*
* {props} is a dictionary with these fields:
* bufnr buffer to add the property to; when omitted
* the current buffer is used
* id user defined ID for the property; must be a
* number; when omitted zero is used
* 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.
*
* It is not possible to add a text property with a "text" field
* here.
*
* Example:
* call prop_add_list(#{type: 'MyProp', id: 2},
* \ [[1, 4, 1, 7],
* \ [1, 15, 1, 20],
* \ [2, 30, 3, 30]]
*
* Can also be used as a |method|:
* GetProp()->prop_add_list([[1, 1, 1, 2], [1, 4, 1, 8]])
*/
Expand Down

0 comments on commit 99065f8

Please sign in to comment.