diff options
Diffstat (limited to 'core/layout.zig')
| -rw-r--r-- | core/layout.zig | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/layout.zig b/core/layout.zig index 7fa57ee9..f9b9ef81 100644 --- a/core/layout.zig +++ b/core/layout.zig @@ -1429,9 +1429,14 @@ pub fn compute(p: *Pardes) void { /// The fewest rows a pane is laid out with: a terminal keeps its tag and /// `min_body_rows` (a shorter one loses its prompt and reads busy for -/// ever), a text pane may shrink to its tag, as acme's windows do. +/// ever), a text pane may shrink to its tag, as acme's windows do. A tag +/// out of rest keeps its band and four body rows, borrowed from the +/// column's other panes, which shrink to their tags until it rolls up +/// (walk UI SPEC ยง3.6). fn floorRows(p: *Pardes, id: usize) u16 { const pane = p.panes[id] orelse return 0; + const band = pardes.Band.takes(p, id); + if (band > 0) return @max(1, pane.tag_rows -| pane.band_rows) + band + 4; return if (pane.isTerminal()) @max(1, pane.tag_rows) + min_body_rows else 1; } @@ -1630,7 +1635,7 @@ pub fn tagCapacity(p: *const Pardes, physical_width: u16) u16 { /// A frontend's tag hit, if what it names is still there: resolved on /// the place it carries (Layer.Place), not on this process's frame. pub fn reprojectTagHit(p: *const Pardes, tag_hit: TagHit) ?TagHit { - if (tag_hit.kind == .pane) { + if (tag_hit.kind == .pane or tag_hit.kind == .band) { if (tag_hit.id >= p.panes.len) return null; const pane = p.panes[tag_hit.id] orelse return null; if (pane.serial != tag_hit.serial) return null; |
