Skip to content

Commit 170ab43

Browse files
committed
fix: terminals size
1 parent 1687c3c commit 170ab43

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/components/Terminal.client.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ function connectWs() {
122122
doFit();
123123
if (term && ws && ws.readyState === WebSocket.OPEN) {
124124
ws.send(JSON.stringify({ type: "resize", terminalId: sharedTerminalId, cols: term.cols, rows: term.rows }));
125+
// Ctrl+L: tell the shell to redraw the screen, clearing zsh PROMPT_SP `%`
126+
if (props.shareTerminalId) {
127+
ws.send(JSON.stringify({ type: "input", terminalId: sharedTerminalId, data: "\x0c" }));
128+
}
125129
}
126130
});
127131
} else if (msg.type === "output" && term) {

0 commit comments

Comments
 (0)