From 25c847e28ae77f5c648d423d64011736f55eda4a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 14:20:12 -0300 Subject: Delcol on the last column leaves the window, empty but for its workspace tag, as acme's does The last column's Delcol ended the session. The window now stays, with only the workspace tag; Newcol, and New (which makes the column it goes in), start it again. A word run with no pane at all runs with a stand-in that is no pane, the root ctl takes session words, and pane/new makes its scratch in the session's directory. Co-Authored-By: Claude Opus 5.5 --- test/fs.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test') diff --git a/test/fs.py b/test/fs.py index 6a9e78f6..3c0ece79 100644 --- a/test/fs.py +++ b/test/fs.py @@ -847,6 +847,23 @@ def odd_paths(binary): assert why in str(refused), (line, refused) +def delcol_last_keeps_window(binary): + """Delcol on the last column leaves the window, empty but for the + workspace tag, as acme does; Newcol and New start again from there.""" + with tempfile.TemporaryDirectory(prefix='pardes-delcol-') as directory: + with session(binary, Path(directory), 'delcol') as (client, _): + def columns(): + return [l for l in client.read('/layout').decode().splitlines() if l and not l.startswith('active')] + while columns(): + client.write(f'/col/{columns()[0].split()[0]}/ctl', b'Delcol\n') + # Still here, empty. + assert client.read('/index') == b'', client.read('/index') + client.write('/ctl', b'Newcol\n') + assert len(columns()) == 1, columns() + serial = new_pane(client, b'back\n') + assert str(serial).encode() in client.read('/index'), client.read('/index') + + def cut_writes(binary): """A write bigger than a 9P message comes as several, cut anywhere: each command line runs once, whole, an Edit block once it ends, and a last @@ -880,6 +897,7 @@ def test(binary, quic=False): started = time.monotonic() cut_writes(binary) odd_paths(binary) + delcol_last_keeps_window(binary) run_file(binary) exit_answers(binary) unattended_messages_expire(binary) -- cgit v1.3