diff options
| author | user <user@clank> | 2026-08-14 17:01:47 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-14 17:01:47 +0200 |
| commit | 954989dc58c6f98593cc97cb1cc43a3833cb8d22 (patch) | |
| tree | 4f7414b153d1dfca1f473015ee4e4e0f572b78cd /docs | |
| parent | sl0ppty: the tab strip answers the pointer (diff) | |
| download | slosh-954989dc58c6f98593cc97cb1cc43a3833cb8d22.tar.gz slosh-954989dc58c6f98593cc97cb1cc43a3833cb8d22.tar.xz slosh-954989dc58c6f98593cc97cb1cc43a3833cb8d22.zip | |
sl0ppty: a pane has to clear the floor in both directions
Two panes stacked on top of each other could be squeezed to four columns wide
and nothing collapsed, at any width.
The fit check lived only on split nodes, and a split node only ever asks about
the dimension it divides: a row split asks about height and never about width.
A leaf was asked nothing at all. So for a stacked layout there was no node in
the tree responsible for noticing that its panes had become unusably narrow —
the check existed, it was just looking the other way.
A leaf is the only node that can see both of its own sides, so it now checks
both. The floor is per pane and the same in every arrangement, which is what
made this a hole rather than a missing feature.
That immediately made resizing dangerous, which is the more interesting half.
Dragging a divider one cell too far could push a pane under the floor and
collapse the entire tab into a list — a drastic answer to a nudge, and it
looked like the session falling over rather than a limit being reached. So the
transfer stops at the floor instead, the way every other resizable thing stops.
The clamp went into transfer_weight rather than into the caller, because the
mouse reaches it through drag_edge and the keyboard through resize_focus, and
my first attempt clamped only the mouse. A limit that one of two paths respects
is worse than none: it looks fixed until you use the other hand.
It also has to round the weight *up*. The weight that buys exactly `floor_`
cells is a fraction, and rounding it down buys one cell fewer — which is
precisely the cell that puts the pane under the floor. The first version
rounded down and collapsed anyway, one drag later than before.
Two tests changed with real content rather than arithmetic: one used a
seventy-six by eight screen whose panes were four rows tall, which is under the
floor and should always have collapsed, and one asserted a squeezed pane stayed
"at least 3 columns" when it now stops at 24 exactly.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
