diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 19:36:58 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 1df6bd12fafbf97062f7844a23de208add75a843 (patch) | |
| tree | 78b61cfebeb12c40b679d053b457d2e28f232784 /src/gui | |
| parent | 1f8de151e382755c1ce597f166ea4552e7f7e8d1 (diff) | |
| download | pardes-1df6bd12fafbf97062f7844a23de208add75a843.tar.gz pardes-1df6bd12fafbf97062f7844a23de208add75a843.zip | |
A pane tag wraps onto rows and can collapse to one, as acme's does
acme's frame wraps a tag at its right edge and the window grows to show
every row (wind.c wintaglines); Tagup/Tagdown shrink it to one row and back.
Pane tags used to be one row, scrolled sideways to the caret. Now a tag's
lines wrap at its width (one cell kept for the caret past a full row) and it
starts expanded; insert-mode Up on the first row collapses it, Down on the
last row expands it, and Alt-Up/Alt-Down do so in either mode. A word the
wrap breaks across rows is still one word to a click and a selection.
Column and workspace tags keep scrolling sideways.
Tests read body rows relative to the body's first row; the 41 snapshot
goldens that moved were re-recorded by name after a programmatic check that
each differs only by body rows shifting under the taller tags, and twelve
scripts whose clicks targeted fixed rows now click the same text.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/gui')
| -rw-r--r-- | src/gui/gui.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/gui.zig b/src/gui/gui.zig index 84ec1c5c..321c80b5 100644 --- a/src/gui/gui.zig +++ b/src/gui/gui.zig @@ -3741,9 +3741,10 @@ test "tagline pointer mapping retains physical grips and carries logical text co try std.testing.expect(grip.tag_hit == null); try std.testing.expectEqual(r.x + config.GUTTER - 1, grip.col); - const body = gridCellAtDimensions(core, x, (@as(f32, @floatFromInt(tag_y + 1)) + 0.5) * body_h, body_w, body_h, tag_w); + const body_y = tag_y + core.panes[core.active].?.tag_rows; // a long tag wraps + const body = gridCellAtDimensions(core, x, (@as(f32, @floatFromInt(body_y)) + 0.5) * body_h, body_w, body_h, tag_w); try std.testing.expectEqual(pixelCell(x, 10), body.col); - try std.testing.expectEqual(tag_y + 1, body.row); + try std.testing.expectEqual(body_y, body.row); try std.testing.expect(body.tag_hit == null); const topbar = gridCellAtDimensions(core, 3.5 * tag_w, 0.5 * body_h, body_w, body_h, tag_w); |
