1
1
import type { Denops } from "@denops/core" ;
2
2
import * as itertools from "@lambdalisue/itertools" ;
3
3
import { unreachable } from "@lambdalisue/unreachable" ;
4
- import * as batch from "../batch/mod .ts" ;
4
+ import { batch } from "../batch/batch .ts" ;
5
5
import * as vimFn from "../function/vim/mod.ts" ;
6
6
import * as nvimFn from "../function/nvim/mod.ts" ;
7
7
@@ -154,7 +154,7 @@ async function vimDecorate(
154
154
props . add ( [ deco . line , deco . column , deco . line , deco . column + deco . length ] ) ;
155
155
decoMap . set ( propType , props ) ;
156
156
}
157
- await batch . batch ( denops , async ( denops ) => {
157
+ await batch ( denops , async ( denops ) => {
158
158
for ( const highlight of hs ) {
159
159
const propType = toPropType ( highlight ) ;
160
160
await vimFn . prop_type_add ( denops , propType , {
@@ -184,7 +184,7 @@ async function vimUndecorate(
184
184
p . type . startsWith ( "denops_std:buffer:decoration:decorate:" )
185
185
) . map ( ( p ) => p . id ) ,
186
186
) ;
187
- await batch . batch ( denops , async ( denops ) => {
187
+ await batch ( denops , async ( denops ) => {
188
188
for ( const propId of propIds ) {
189
189
await vimFn . prop_remove ( denops , { id : propId , bufnr, all : true } ) ;
190
190
}
@@ -201,7 +201,7 @@ async function nvimDecorate(
201
201
"denops_std:buffer:decoration:decorate" ,
202
202
) ;
203
203
for ( const chunk of itertools . chunked ( decorations , 1000 ) ) {
204
- await batch . batch ( denops , async ( denops ) => {
204
+ await batch ( denops , async ( denops ) => {
205
205
for ( const deco of chunk ) {
206
206
await nvimFn . nvim_buf_add_highlight (
207
207
denops ,
0 commit comments