From 956279eca4079cfff7d50e43ffca115e2eccb4c8 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Fri, 1 May 2026 13:11:26 +0200 Subject: [PATCH] tell tmux to refresh-client on resize tmux doesn't re-read the PTY winsize on SIGWINCH. After the ioctl resize, call tmux refresh-client -C cols,rows to update tmux's internal window dimensions. Co-Authored-By: Claude Opus 4.6 (1M context) --- .pql/pql-plan.json | 2 +- lib/builtin/claude/src/claude_pane.dart | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.pql/pql-plan.json b/.pql/pql-plan.json index c114e76e..b1d18ad8 100644 --- a/.pql/pql-plan.json +++ b/.pql/pql-plan.json @@ -1,5 +1,5 @@ { - "exported_at": "2026-05-01T11:03:51Z", + "exported_at": "2026-05-01T11:11:26Z", "decisions": [ { "id": "D-1", diff --git a/lib/builtin/claude/src/claude_pane.dart b/lib/builtin/claude/src/claude_pane.dart index 723f1a03..2f34d0b7 100644 --- a/lib/builtin/claude/src/claude_pane.dart +++ b/lib/builtin/claude/src/claude_pane.dart @@ -242,8 +242,10 @@ class _ClaudePaneState extends State { _resizeTimer = Timer(const Duration(milliseconds: 150), () { final id = _paneId; if (id == null) return; - print('[resize] cols=$cols rows=$rows'); _ipc()?.request('pane.resize', args: {'id': id, 'cols': cols, 'rows': rows}); + // tmux doesn't re-read PTY winsize on SIGWINCH — it needs an + // explicit refresh-client to update its internal window size. + Process.run('tmux', ['refresh-client', '-C', '$cols,$rows']); }); }