Simplify terminal resize - no more size toggling

Remove all the -1 column toggle tricks for forcing tmux redraws.
Just set the size directly.
This commit is contained in:
GitHub Copilot
2026-01-24 16:53:53 +00:00
parent a771e1469e
commit 1a5222ab2a
2 changed files with 4 additions and 30 deletions
+1 -4
View File
@@ -377,10 +377,7 @@ class TestTerminalSession:
with patch.object(loop, "run_in_executor", new=AsyncMock()) as run_in_executor:
await session.set_terminal_size(80, 24)
# set_terminal_size toggles size (-1 then restore) to force redraw
assert run_in_executor.await_count == 2
run_in_executor.assert_any_await(None, session._set_terminal_size, 79, 24)
run_in_executor.assert_any_await(None, session._set_terminal_size, 80, 24)
run_in_executor.assert_awaited_once_with(None, session._set_terminal_size, 80, 24)
def test__set_terminal_size_calls_ioctl(self):
from textual_webterm.terminal_session import TerminalSession