diff options
| author | user <user@clank> | 2026-08-13 18:46:58 +0200 |
|---|---|---|
| committer | user <user@clank> | 2026-08-13 18:46:58 +0200 |
| commit | 2f0750285b1b174a552113c4aed9288f44985ae3 (patch) | |
| tree | e8033ba0b3d3ac04e4e49fb4fa53f7049ac21499 /cli/src/core/errors.ts | |
| parent | docs: handover (diff) | |
| download | sl0ppi-2f0750285b1b174a552113c4aed9288f44985ae3.tar.gz sl0ppi-2f0750285b1b174a552113c4aed9288f44985ae3.tar.xz sl0ppi-2f0750285b1b174a552113c4aed9288f44985ae3.zip | |
sl0p: make the split button visible, and clickable where it is drawn
The `+` shipped in 0.1.7 and 0.1.8 without ever appearing on a live session,
while rendering in 265 snapshots. Four faults, each enough on its own:
- title_line_without_middle computed the right side only inside the left
side's and_then, so a pane with no title (hide_default_pane_names, the live
default) got none at all;
- title_line_with_middle discarded the right side whenever the left was
absent -- that is every frame in a session with a second client, which the
live box always had, and "MY FOCUS AND:" on every frame was saying so;
- the title was budgeted before the button, so a title longer than the frame
(any shell showing a path) consumed its columns. The button is anchored and
hit-tested by pure geometry, so it cannot be the part that loses;
- the click hit-tested position_and_size() while the frame is drawn inset by
the pane gap, putting the clickable columns two right of the glyph and a row
above it at the top of the screen. Hence "the click works" and "nothing is
drawn" both being true, and that click test proving nothing.
Adds Pane::frame_rect(), the rect the frame is really drawn in, which the
status bar buttons had already had to work around by hand.
Also fixes render_my_focus building its short form from separators that
Vec::append had already drained: 4 cells wide while reporting 6, a title line
two cells short of its pane. Found by asserting the width in the new test.
Verification, since unit tests have now been insufficient here four times:
split_button_is_drawn_where_it_is_hit_tested covers the combinations the live
config produces, and packaging/checks/split-button-live.py (make check-live)
reads the glyph off a real session, attaches a second client to force the
middle builder, and clicks the columns it found the glyph in. Both confirmed
to fail on the parent commit.
Diffstat (limited to 'cli/src/core/errors.ts')
0 files changed, 0 insertions, 0 deletions
