Skip to content

Commit 16197bc

Browse files
authored
Merge pull request #4 from mityu/use-helper-getbufinfo
fix: Use @denops/std/helper/getbufinfo instead
2 parents a21bd0a + bd568d2 commit 16197bc

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

builtin/source/buffer.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { unreachable } from "@core/errorutil/unreachable";
2-
import * as fn from "@denops/std/function";
2+
import type * as fn from "@denops/std/function";
3+
import { getbufinfo } from "@denops/std/helper/getbufinfo";
34

45
import { defineSource, type Source } from "../../source.ts";
56

@@ -44,7 +45,7 @@ type Filter = "buflisted" | "bufloaded" | "bufmodified";
4445
export function buffer(options: Readonly<BufferOptions> = {}): Source<Detail> {
4546
const filter = options.filter;
4647
return defineSource(async function* (denops, _params, { signal }) {
47-
const bufinfo = await fn.getbufinfo(denops);
48+
const bufinfo = await getbufinfo(denops);
4849
signal?.throwIfAborted();
4950

5051
// Filter and map buffers based on the provided filter option

builtin/source/line.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as fn from "@denops/std/function";
2+
import { getbufinfo } from "@denops/std/helper/getbufinfo";
23

34
import { defineSource, type Source } from "../../source.ts";
45

@@ -50,7 +51,7 @@ export function line(options: LineOptions = {}): Source<Detail> {
5051
const expr = args[0] ?? "%"; // Defaults to the current buffer if no argument is provided.
5152
await fn.bufload(denops, expr); // Ensure the buffer is loaded.
5253
signal?.throwIfAborted();
53-
const bufinfos = await fn.getbufinfo(denops, expr); // Retrieve buffer information.
54+
const bufinfos = await getbufinfo(denops, expr); // Retrieve buffer information.
5455
signal?.throwIfAborted();
5556
const bufinfo = bufinfos[0];
5657

deno.jsonc

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"imports": {
115115
"@core/errorutil": "jsr:@core/errorutil@^1.2.0",
116116
"@core/iterutil": "jsr:@core/iterutil@^0.9.0",
117-
"@denops/std": "jsr:@denops/std@^7.3.0",
117+
"@denops/std": "jsr:@denops/std@^7.5.0",
118118
"@denops/test": "jsr:@denops/test@^3.0.4",
119119
"@lambdalisue/systemopen": "jsr:@lambdalisue/systemopen@^1.0.0",
120120
"@lambdalisue/unnullish": "jsr:@lambdalisue/unnullish@^1.0.2",

0 commit comments

Comments
 (0)