Skip to content

Commit 504bc8e

Browse files
committed
Use nvim_buf_set_extmark instead of deprecated nvim_buf_add_highlight
1 parent aa42928 commit 504bc8e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

buffer/decoration.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,16 @@ async function nvimDecorate(
261261
for (const chunk of itertools.chunked(decorations, 1000)) {
262262
await batch(denops, async (denops) => {
263263
for (const deco of chunk) {
264-
await nvimFn.nvim_buf_add_highlight(
264+
await nvimFn.nvim_buf_set_extmark(
265265
denops,
266266
bufnr,
267267
ns,
268-
deco.highlight,
269268
deco.line - 1,
270269
deco.column - 1,
271-
deco.column - 1 + deco.length,
270+
{
271+
end_col: deco.column - 1 + deco.length,
272+
hl_group: deco.highlight,
273+
},
272274
);
273275
}
274276
});

0 commit comments

Comments
 (0)