From 7053362c704d94b73bbb2ce9fb104321060661da Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 23:04:59 -0300 Subject: placement under Tagbottom: a look from a pane's text goes under its text with every line of it in sight above its tag (test/behaviour/placement.zig), which pins layout's split arithmetic, a pane's tag plus its text at either end, that the survey's Tagbottom fix would have broken (it hides the last line), and says so at layout.bodyTop Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/layout.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/layout.zig') diff --git a/src/layout.zig b/src/layout.zig index c7d7a189..f687cac7 100644 --- a/src/layout.zig +++ b/src/layout.zig @@ -847,6 +847,10 @@ fn splitAt(p: *Pardes, c: usize, id: usize, y: u16) void { pane.vweight = @floatFromInt(@max(1, (r.y + r.h) - row)); } +/// A pane's top plus its tag's rows, as heights go: a split this far down +/// leaves the pane its tag and that much of its body, whichever end the tag +/// is on (Tagbottom's is at its foot, the height the same; behaviour test +/// "placement: under Tagbottom..."). fn bodyTop(p: *const Pardes, id: usize) u16 { return p.rects[id].y + p.panes[id].?.tag_rows; } -- cgit v1.3