Bump version to 0.3.26 and fix terminal resize issues

This commit is contained in:
GitHub Copilot
2026-01-28 00:08:02 +00:00
parent a006309d55
commit a1da841c45
3 changed files with 2 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "textual-webterm"
version = "0.3.25"
version = "0.3.26"
description = "Serve terminal sessions over the web"
authors = ["Will McGugan <will@textualize.io>"]
license = "MIT"
File diff suppressed because one or more lines are too long
@@ -59,7 +59,6 @@ class WebTerminal {
private reconnectAttempts = 0;
private maxReconnectAttempts = 5;
private reconnectDelay = 1000;
private resizeEventsEnabled = false;
constructor(container: HTMLElement, wsUrl: string, config: TerminalConfig = {}) {
this.element = container;
@@ -115,9 +114,6 @@ class WebTerminal {
// Handle resize
this.terminal.onResize(({ cols, rows }) => {
if (!this.resizeEventsEnabled) {
return;
}
this.send(["resize", { width: cols, height: rows }]);
});
@@ -183,7 +179,6 @@ class WebTerminal {
// Important: the PTY hard-wraps output based on its initial cols/rows.
// If we send a resize before fonts/layout settle, the initial cols can be
// too small and the shell will wrap permanently.
this.resizeEventsEnabled = false;
const init = () => {
const fallback = { cols: 132, rows: 45 };
@@ -203,13 +198,11 @@ class WebTerminal {
return;
}
this.terminal.resize(fallback.cols, fallback.rows);
this.resizeEventsEnabled = true;
this.send(["resize", { width: fallback.cols, height: fallback.rows }]);
return;
}
this.terminal.resize(dims.cols, dims.rows);
this.resizeEventsEnabled = true;
this.send(["resize", { width: dims.cols, height: dims.rows }]);
};