Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
fixed terminal resizing with full screen CLIs
Browse files Browse the repository at this point in the history
  • Loading branch information
FormalSnake committed Jun 30, 2022
1 parent 142d677 commit e1715f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ term.onData((e) => {
ipc.send("terminal.keystroke", e);
});
console.log(bgColor);

term.onResize(function (size) {
ipc.send("terminal.resize", size);
});
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ function createWindow() {
ipcMain.on("terminal.keystroke", (event, key) => {
ptyProcess.write(key);
});
ipcMain.on("terminal.resize", (event, size) => {
ptyProcess.resize(size.cols, size.rows);
console.log("resized");
});
}

app.on("ready", createWindow);
Expand Down

0 comments on commit e1715f2

Please sign in to comment.