summaryrefslogtreecommitdiff
path: root/core/Band.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Band.zig')
-rw-r--r--core/Band.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/Band.zig b/core/Band.zig
index 6e8f9589..5efe1a36 100644
--- a/core/Band.zig
+++ b/core/Band.zig
@@ -141,9 +141,9 @@ pub fn takes(p: *Pardes, id: usize) u16 {
/// (UX DESIGN I1, M2): under its tag's rows (`tag`, its rows at rest, which
/// no state changes), its head's (`head`), then the band's (`band`), as
/// many as the pane has under its tag; `over` the two, drawn over the top
-/// rows of its body, which never move for them. A picker's band keeps a
-/// body of `body_rows` under it (UX D6), any other state only the pane's
-/// rows. Asked of the state alone, as `takes` is: the layout, the frame and
+/// rows of its body, which never move for them. A picker's band over the
+/// pane its preview shows in keeps a body of `body_rows` under it (UX D6,
+/// DESIGN O1), any other only the pane's rows. Asked of the state alone, as `takes` is: the layout, the frame and
/// a click ask it of the same step.
pub const Covered = struct { tag: u16, head: u16, band: u16, over: u16 };
pub fn covered(p: *Pardes, pane: *const Pane, id: usize) Covered {
@@ -153,7 +153,7 @@ pub fn covered(p: *Pardes, pane: *const Pane, id: usize) Covered {
// over it to them).
const tag = @min(layout.wantedTagRows(p, id), pardes.MAX_TAG_ROWS, @max(pardes.BOX_H, h -| 1));
const head = @min(layout.headRows(p, id), h -| tag);
- const keep: u16 = if (p.view().tag_state.kind == .pick) body_rows else 0;
+ const keep: u16 = if (@import("Pick.zig").previewPane(p, id)) body_rows else 0;
const band = @min(takes(p, id), h -| tag -| head -| keep);
return .{ .tag = tag, .head = head, .band = band, .over = head + band };
}