Skip to content

Commit 8eefd39

Browse files
committed
fix: shared terminal size handling
1 parent b154ee9 commit 8eefd39

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

.github/workflows/electron-build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ jobs:
1414
strategy:
1515
matrix:
1616
include:
17-
# - os: windows
18-
# platform: win
19-
# artifact: .exe
17+
- os: windows
18+
platform: win
19+
artifact: .exe
2020
- os: macos
2121
platform: mac
2222
artifact: .dmg
23-
# - os: ubuntu
24-
# platform: linux
25-
# artifact: .AppImage
23+
- os: ubuntu
24+
platform: linux
25+
artifact: .AppImage
2626

2727
runs-on: ${{ matrix.os }}-latest
2828

app/components/Terminal.client.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ function connectWs() {
116116
if (!props.shareTerminalId) {
117117
emit("shareCreated", msg.terminalId, msg.name ?? "");
118118
}
119+
// Re-fit and notify PTY of actual dimensions — the replayed output may have
120+
// been at different dimensions (guest vs host), causing zsh PROMPT_SP glitch.
121+
nextTick(() => {
122+
doFit();
123+
if (term && ws && ws.readyState === WebSocket.OPEN) {
124+
ws.send(JSON.stringify({ type: "resize", terminalId: sharedTerminalId, cols: term.cols, rows: term.rows }));
125+
}
126+
});
119127
} else if (msg.type === "output" && term) {
120128
term.write(msg.data);
121129
} else if (msg.type === "exit" && term) {

0 commit comments

Comments
 (0)