Skip to content

Commit

Permalink
⚡ Save history file.
Browse files Browse the repository at this point in the history
  • Loading branch information
yukimemi committed Jan 20, 2024
1 parent 3b05bdb commit 6c98779
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions denops/futago/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// =============================================================================
// File : main.ts
// Author : yukimemi
// Last Change : 2024/01/14 22:50:32.
// Last Change : 2024/01/20 11:38:00.
// =============================================================================

import * as batch from "https://deno.land/x/denops_std@v5.2.0/batch/mod.ts";
Expand Down Expand Up @@ -287,10 +287,7 @@ export async function main(denops: Denops): Promise<void> {
await fn.setpos(denops, ".", [futago.buf.bufnr, lastLine, 0, 0]);

// Save buffer to file.
const bufname = await fn.bufname(denops, futago.buf.bufnr);
if (bufname.startsWith("futago:")) {
await Deno.writeTextFile(futago.path, bufLines.join("\n"));
}
await Deno.writeTextFile(futago.path, bufLines.join("\n"));
} catch (e) {
console.error(`main.ts`, e);
} finally {
Expand Down

0 comments on commit 6c98779

Please sign in to comment.