summaryrefslogtreecommitdiff
path: root/src/term_pane.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-09 01:26:08 -0300
committerGabriel Schneider <[email protected]>2026-08-10 09:17:07 -0300
commit09c35b22793153d201fa202b52671a6442e5e2e1 (patch)
tree1eb84c955dc96f4c6bcb75b36f6113ccad8e2f1e /src/term_pane.zig
parent475cc49ccbe9e81f8ec8aa2371c20fc632d110b9 (diff)
downloadpardes-09c35b22793153d201fa202b52671a6442e5e2e1.tar.gz
pardes-09c35b22793153d201fa202b52671a6442e5e2e1.zip
a builtin to put the pane taglines at the bottom
Diffstat (limited to 'src/term_pane.zig')
-rw-r--r--src/term_pane.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/term_pane.zig b/src/term_pane.zig
index 1c03afa7..47123ceb 100644
--- a/src/term_pane.zig
+++ b/src/term_pane.zig
@@ -99,6 +99,7 @@ pub fn bodyText(arena: std.mem.Allocator, pane: *Pane) ![]const u8 {
pub fn recolorAnsi(p: *Pardes, pane: *Pane, r: pardes.Rect, tx: u16, tw: u16, body_h: u16, off: i32) void {
const s = &p.surface;
const goff: i32 = @intCast(pane.vt.screens.active.pages.scrollbar().offset);
+ const body_y = if (p.tag_bottom) r.y else r.y + pardes.BOX_H;
var vr: u16 = 0;
while (vr < body_h and vr < pane.rows) : (vr += 1) {
const grid = pane.gridRow(off + @as(i32, vr)) - goff;
@@ -110,7 +111,7 @@ pub fn recolorAnsi(p: *Pardes, pane: *Pane, r: pardes.Rect, tx: u16, tw: u16, bo
while (c < tw) : (c += 1) {
const ci = pane.vt.screens.active.pages.getCell(.{ .viewport = .{ .x = @intCast(c), .y = @intCast(grid) } }) orelse continue;
if (ci.cell.wide == .spacer_tail) continue;
- const cell = s.at(tx + c, r.y + pardes.BOX_H + vr);
+ const cell = s.at(tx + c, body_y + vr);
if (cell.default) continue;
cell.style = cellStyle(p, ci);
}