Skip to content

Commit

Permalink
fix: resizing window on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Im-Beast committed Aug 1, 2023
1 parent 4556c5d commit 34196ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ export class Tui extends EventEmitter<
};

updateCanvasSize();

if (Deno.build.os === "windows") {
this.canvas.on("render", updateCanvasSize);
this.canvas.size.subscribe(updateCanvasSize);
} else {
Deno.addSignalListener("SIGWINCH", updateCanvasSize);
}
Expand Down

0 comments on commit 34196ba

Please sign in to comment.