Skip to content

Commit

Permalink
never ever use this
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukimizake committed Aug 4, 2024
1 parent d4835da commit dbe0869
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion denops/aider/aiderCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const aiderCommand = {
async addCurrentFile(denops: Denops): Promise<void> {
const bufnr = await fn.bufnr(denops, "%");
if (await getTerminalBufferNr(denops) === undefined) {
await this.run(denops);
await aiderCommand.run(denops);
}
const bufType = await fn.getbufvar(denops, bufnr, "&buftype");
if (bufType === "terminal") {
Expand Down
20 changes: 10 additions & 10 deletions denops/aider/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const buffer = {
): Promise<void | undefined | boolean> {
const aiderBufnr = await getTerminalBufferNr(denops);
if (aiderBufnr) {
await this.openFloatingWindow(denops, aiderBufnr);
await buffer.openFloatingWindow(denops, aiderBufnr);
return true;
}

Expand All @@ -136,7 +136,7 @@ export const buffer = {
is.Number,
);

await this.openFloatingWindow(
await buffer.openFloatingWindow(
denops,
bufnr,
);
Expand All @@ -149,7 +149,7 @@ export const buffer = {
if (bufnr === undefined) {
return;
}
await this.openFloatingWindow(denops, bufnr);
await buffer.openFloatingWindow(denops, bufnr);

await feedkeys(denops, "G");
await feedkeys(denops, '"qp');
Expand Down Expand Up @@ -213,12 +213,12 @@ export const buffer = {
return;
}

await this.openFloatingWindow(denops, bufnr);
await buffer.openFloatingWindow(denops, bufnr);

const openBufferType = await this.getOpenBufferType(denops);
const openBufferType = await buffer.getOpenBufferType(denops);
openBufferType === "floating"
? await this.sendPromptFromFloatingWindow(denops)
: await this.sendPromptFromSplitWindow(denops);
? await buffer.sendPromptFromFloatingWindow(denops)
: await buffer.sendPromptFromSplitWindow(denops);
},
async sendPrompt(
denops: Denops,
Expand All @@ -229,8 +229,8 @@ export const buffer = {
await denops.cmd("bdelete!");

openBufferType === "floating"
? this.sendPromptFromFloatingWindow(denops)
: this.sendPromptFromSplitWindow(denops);
? buffer.sendPromptFromFloatingWindow(denops)
: buffer.sendPromptFromSplitWindow(denops);

return;
},
Expand Down Expand Up @@ -264,7 +264,7 @@ export const buffer = {
await n.nvim_create_buf(denops, false, true),
is.Number,
);
await this.openFloatingWindow(
await buffer.openFloatingWindow(
denops,
bufnr,
);
Expand Down
4 changes: 2 additions & 2 deletions denops/aider/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ export async function main(denops: Denops): Promise<void> {
}
const prompt = `/add ${path}`;
await v.r.set(denops, "q", prompt);
await this.sendPromptWithInput();
await denops.dispatcher.sendPromptWithInput();
},
async addWeb(url: unknown): Promise<void> {
if (url === "") {
return;
}
const prompt = `/web ${url}`;
await v.r.set(denops, "q", prompt);
await this.sendPromptWithInput();
await denops.dispatcher.sendPromptWithInput();
},
async exit(): Promise<void> {
const bufnr = await getTerminalBufferNr(denops);
Expand Down

0 comments on commit dbe0869

Please sign in to comment.