Skip to content

Commit 04914a0

Browse files
committed
🐛 Fix prop_add_list function on Vim
1 parent 15cf43c commit 04914a0

File tree

3 files changed

+46
-39
lines changed

3 files changed

+46
-39
lines changed

denops_std/function/vim/_generated.ts

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,45 +1409,6 @@ export function prop_add(denops: Denops, ...args: unknown[]): Promise<unknown> {
14091409
return denops.call("prop_add", ...args);
14101410
}
14111411

1412-
/**
1413-
* Similar to prop_add(), but attaches a text property at
1414-
* multiple positions in a buffer.
1415-
* {props} is a dictionary with these fields:
1416-
* bufnr buffer to add the property to; when omitted
1417-
* the current buffer is used
1418-
* id user defined ID for the property; must be a
1419-
* number; when omitted zero is used
1420-
* type name of the text property type
1421-
* All fields except "type" are optional.
1422-
* The second argument is a List of Lists where each list
1423-
* specifies the starting and ending position of the text. The
1424-
* first two items {lnum} and {col} specify the starting position
1425-
* of the text where the property will be attached and the last
1426-
* two items {end-lnum} and {end-col} specify the position just
1427-
* after the text.
1428-
* Example:
1429-
* call prop_add_list(#{type: 'MyProp', id: 2},
1430-
* \ [[1, 4, 1, 7],
1431-
* \ [1, 15, 1, 20],
1432-
* \ [2, 30, 3, 30]]
1433-
* Can also be used as a |method|:
1434-
* GetProp()->prop_add_list([[1, 1, 1, 2], [1, 4, 1, 8]])
1435-
*/
1436-
export function prop_add_list(
1437-
denops: Denops,
1438-
props: unknown,
1439-
lnum: unknown,
1440-
col: unknown,
1441-
end_lnum: unknown,
1442-
end_col: unknown,
1443-
): Promise<unknown>;
1444-
export function prop_add_list(
1445-
denops: Denops,
1446-
...args: unknown[]
1447-
): Promise<unknown> {
1448-
return denops.call("prop_add_list", ...args);
1449-
}
1450-
14511412
/**
14521413
* Remove all text properties from line {lnum}.
14531414
* When {lnum-end} is given, remove all text properties from line

denops_std/function/vim/_manual.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./prop_add_list.ts";
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import type { Denops } from "https://deno.land/x/denops_core@v3.2.2/mod.ts";
2+
3+
export type PropAddListProps = {
4+
bufnr?: number;
5+
id?: number;
6+
type: string;
7+
};
8+
9+
export type PropAddListItem = [number, number, number, number];
10+
11+
/**
12+
* Similar to prop_add(), but attaches a text property at
13+
* multiple positions in a buffer.
14+
* {props} is a dictionary with these fields:
15+
* bufnr buffer to add the property to; when omitted
16+
* the current buffer is used
17+
* id user defined ID for the property; must be a
18+
* number; when omitted zero is used
19+
* type name of the text property type
20+
* All fields except "type" are optional.
21+
* The second argument is a List of Lists where each list
22+
* specifies the starting and ending position of the text. The
23+
* first two items {lnum} and {col} specify the starting position
24+
* of the text where the property will be attached and the last
25+
* two items {end-lnum} and {end-col} specify the position just
26+
* after the text.
27+
* Example:
28+
* call prop_add_list(#{type: 'MyProp', id: 2},
29+
* \ [[1, 4, 1, 7],
30+
* \ [1, 15, 1, 20],
31+
* \ [2, 30, 3, 30]]
32+
* Can also be used as a |method|:
33+
* GetProp()->prop_add_list([[1, 1, 1, 2], [1, 4, 1, 8]])
34+
*/
35+
export function prop_add_list(
36+
denops: Denops,
37+
props: PropAddListProps,
38+
items: PropAddListItem[],
39+
): Promise<unknown>;
40+
export function prop_add_list(
41+
denops: Denops,
42+
...args: unknown[]
43+
): Promise<unknown> {
44+
return denops.call("prop_add_list", ...args);
45+
}

0 commit comments

Comments
 (0)