From 07706163ab3a5dfbb2c6940ac6e5966b19e0074e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 07:28:59 -0300 Subject: A detached session no frontend has sized is 160x50, not 80x24 At 80x24 a script's third or fourth pane/new was refused for want of rows. `size` still sets any other size, and a frontend attaching its own. Co-Authored-By: Claude Opus 5.5 --- test/fs.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/fs.py b/test/fs.py index 45fdbc38..89801a71 100644 --- a/test/fs.py +++ b/test/fs.py @@ -596,12 +596,12 @@ def cut_writes(binary): client.write(f'/pane/{serial}/ctl', block) body = client.read(f'/pane/{serial}/body').decode().splitlines() assert body == ['line %05d of the block' % i for i in range(2500)], (len(body), body[:2]) - # A detached session with no frontend is 80x24 until told. + # A detached session with no frontend is 160x50 until told. screen = client.screen() - assert (screen['cols'], screen['rows']) == (80, 24), (screen['cols'], screen['rows']) - client.write('/ctl', b'size 132 50\n') + assert (screen['cols'], screen['rows']) == (160, 50), (screen['cols'], screen['rows']) + client.write('/ctl', b'size 132 40\n') screen = client.screen() - assert (screen['cols'], screen['rows']) == (132, 50), (screen['cols'], screen['rows']) + assert (screen['cols'], screen['rows']) == (132, 40), (screen['cols'], screen['rows']) def test(binary, quic=False): @@ -813,7 +813,7 @@ def test(binary, quic=False): contents = restored.read(f'/pane/{file_id}/body') assert contents == b'dumped state\n', (contents, saved.read_text(), restored.read('/index')) assert restored.read(f'/pane/{control_id}/body') == b'', 'commands ran through exec, not the body' - assert restored.screen()['cols'] == 80 + assert restored.screen()['cols'] == (80 if tty else 160) # a detached one is 160x50 opened = look(restored, '/n/own/os' + str(root / (name + '.txt')), source=control_id) assert restored.read(f'/pane/{opened}/body') == b'initial\n' -- cgit v1.3