diff options
| author | user <user@clank> | 2026-08-14 14:45:49 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-14 14:45:49 +0200 |
| commit | 037c3550f075ff78e680e5a1f1508d4c292ffcb1 (patch) | |
| tree | 18c085806ac40d1e5ff9b49e6cee668732152fde /tests/test_tabs.py | |
| parent | sl0ppty: pane states are a table, not three hardcoded knobs (diff) | |
| download | slosh-037c3550f075ff78e680e5a1f1508d4c292ffcb1.tar.gz slosh-037c3550f075ff78e680e5a1f1508d4c292ffcb1.tar.xz slosh-037c3550f075ff78e680e5a1f1508d4c292ffcb1.zip | |
sl0ppty: a floor under splitting, and an arrow saying which way
Two changes to the same affordance.
A border stops being a button below `min_split cols=32 rows=8`. This is a
different question from min_pane, which is where the layout gives up and
collapses a pane: two twenty-five column panes technically fit and are not
worth having, so the number that decides whether to *offer* a split is larger
than the one that decides whether a pane can survive. It is clamped to never
go below min_pane, because refusing to offer what the layout would collapse
anyway is the floor under the floor.
The test is the layout's own arithmetic rather than an approximation of it:
the same floor, the same gap, and the same child count the split would create
— which is one more sibling when the parent already splits that way and two
when it does not. The guide's standing claim is that drawing and the layout
cannot disagree, and a guide promising a split that immediately collapsed
would be exactly that.
The keyboard obeys the same floor, with a toast. A rule only the mouse
followed would mean the same session splits or refuses depending on how you
asked, and whether there is room cannot depend on that. The control API and
layout files are *not* bound by it: a script asking for a pane is declaring
what it wants rather than being offered something, and D6's responsive
collapse is what catches it there. That distinction was not free — app_split_pane
went through the same helper as the keybinding, so the API was silently bound
too until a test noticed, and the interactive path is now its own function.
The guide also gained an arrow on the dashed line, pointing at the half the
new pane will take. The line already said where the boundary lands and left
which side to be inferred from which border you happened to be touching.
Pointers for left and right rather than the matching triangles: U+25C0 and
U+25B6 carry emoji presentation and are widely rendered double-width, while
screen_text books every chrome glyph as exactly one cell — so one that drew as
two would shift the rest of the row. U+25B2 is already the scroll indicator,
so the vertical pair is known good here.
Raising a floor invalidates every test that quietly relied on the old one, and
nine of them did: sessions sized for a world where a sixty-column terminal
could be split into columns. They are sized for the rule now, and the two that
were really about *layout* collapse rather than the affordance now split over
the API, which is the path that still means "do it anyway".
Diffstat (limited to 'tests/test_tabs.py')
| -rw-r--r-- | tests/test_tabs.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_tabs.py b/tests/test_tabs.py index c45073e..5407eaf 100644 --- a/tests/test_tabs.py +++ b/tests/test_tabs.py @@ -79,7 +79,7 @@ def test_tab_click(): def test_closing_a_tab(): - with Session(SH, cols=60, rows=14) as s: + with Session(SH, cols=76, rows=14) as s: s.settle() s.key("c") s.settle() |
