summaryrefslogtreecommitdiff
path: root/src/layout.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:04:59 -0300
committerGabriel Schneider <[email protected]>2026-11-05 01:00:58 -0300
commit7053362c704d94b73bbb2ce9fb104321060661da (patch)
treead6403790b445bd8d9ff7de901dcd3aec4ea2406 /src/layout.zig
parent15c9ac31ab95541df4f8e3740e4b1b6e1b25155b (diff)
downloadpardes-7053362c704d94b73bbb2ce9fb104321060661da.tar.gz
pardes-7053362c704d94b73bbb2ce9fb104321060661da.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/layout.zig')
-rw-r--r--src/layout.zig4
1 files changed, 4 insertions, 0 deletions
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;
}