From 672b2643583d13feef5d47600e0f6c15f276fba2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 02:32:33 -0300 Subject: No placement leaves a pane shorter than its tag and two rows Placement could split a pane down to a tag and one row, or give a new one less. Every placement now checks the pane it made and each pane it shrank against its tag (wrapped at its width) plus two rows: where they lack the room, the column's tallest pane is halved instead, and where none can give it the new pane is refused with "no space for a pane in that column" (ENOSPC over 9P) and closed at the step's end, once its maker is done with it. splitBelow and splitParent leave two body rows (a boot layout, split before any row exists, is as before). Re-recorded by name: lookpanes (panes one or two rows lower) and splitparent (the 6-row squeeze now refuses); fs.py closes the scratches and long-named panes it no longer needs, since its 24-row session filled. Co-Authored-By: Claude Opus 5.5 --- test/fs.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/fs.py') diff --git a/test/fs.py b/test/fs.py index bdfc3fcb..68da6c51 100644 --- a/test/fs.py +++ b/test/fs.py @@ -121,6 +121,10 @@ def look(client, path, source=None): client.write(f'/pane/{serial}/look', f'{path}\n'.encode()) results = [int(row) for row in client.read('/look').split()] assert len(results) == 1 and results[0] != serial, (path, results) + # The scratch it looked from goes: a column holds only so many panes, + # each its tag and two rows. + if source is None: + client.remove(f'/pane/{serial}') return results[0] @@ -936,6 +940,7 @@ def test(binary, quic=False): assert path.read_bytes() == b'written through long filename\n' opened = look(client, '/n/os' + str(path)) assert client.read(f'/pane/{opened}/body') == path.read_bytes() + client.remove(f'/pane/{opened}') # a long name's tag takes rows opened = look(client, '/n/os' + str(directory)) listing = client.read(f'/pane/{opened}/body') for path in directory.iterdir(): -- cgit v1.3