Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Use @denops/std/helper/getbufinfo instead #4

Merged
merged 2 commits into from
Feb 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions builtin/source/buffer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { unreachable } from "@core/errorutil/unreachable";
import * as fn from "@denops/std/function";
import type * as fn from "@denops/std/function";
import { getbufinfo } from "@denops/std/helper/getbufinfo";

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

Expand Down Expand Up @@ -44,7 +45,7 @@
export function buffer(options: Readonly<BufferOptions> = {}): Source<Detail> {
const filter = options.filter;
return defineSource(async function* (denops, _params, { signal }) {
const bufinfo = await fn.getbufinfo(denops);
const bufinfo = await getbufinfo(denops);

Check warning on line 48 in builtin/source/buffer.ts

View check run for this annotation

Codecov / codecov/patch

builtin/source/buffer.ts#L48

Added line #L48 was not covered by tests
signal?.throwIfAborted();

// Filter and map buffers based on the provided filter option
Expand Down
3 changes: 2 additions & 1 deletion builtin/source/line.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as fn from "@denops/std/function";
import { getbufinfo } from "@denops/std/helper/getbufinfo";

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

Expand Down Expand Up @@ -50,7 +51,7 @@
const expr = args[0] ?? "%"; // Defaults to the current buffer if no argument is provided.
await fn.bufload(denops, expr); // Ensure the buffer is loaded.
signal?.throwIfAborted();
const bufinfos = await fn.getbufinfo(denops, expr); // Retrieve buffer information.
const bufinfos = await getbufinfo(denops, expr); // Retrieve buffer information.

Check warning on line 54 in builtin/source/line.ts

View check run for this annotation

Codecov / codecov/patch

builtin/source/line.ts#L54

Added line #L54 was not covered by tests
signal?.throwIfAborted();
const bufinfo = bufinfos[0];

Expand Down
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"imports": {
"@core/errorutil": "jsr:@core/errorutil@^1.2.0",
"@core/iterutil": "jsr:@core/iterutil@^0.9.0",
"@denops/std": "jsr:@denops/std@^7.3.0",
"@denops/std": "jsr:@denops/std@^7.5.0",
"@denops/test": "jsr:@denops/test@^3.0.4",
"@lambdalisue/systemopen": "jsr:@lambdalisue/systemopen@^1.0.0",
"@lambdalisue/unnullish": "jsr:@lambdalisue/unnullish@^1.0.2",
Expand Down