diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-10 04:59:03 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-10 05:34:09 -0300 |
| commit | f30dfdb3d5546195a69f8046ded9acc669882b8d (patch) | |
| tree | b8f4ff5648683aeda6d8b820d68ca4b326933289 /src/Kind.zig | |
| parent | 60d4db7046f5cfe130eedbc9dabad680373e3e94 (diff) | |
| download | pardes-f30dfdb3d5546195a69f8046ded9acc669882b8d.tar.gz pardes-f30dfdb3d5546195a69f8046ded9acc669882b8d.zip | |
kind: a view's facts (Kind.viewOf) count its bands as Messages.bands makes them from what a dump keeps (the pane's messages and prompt, the view's leader, rect and tag rows), never the derived copy a step or a park left in Pane.notices or Pane.pv, which a client joined from a dump has not: its kind was told other rows than the session's and the join diverged (`digest N differs in panes pane M.addon`); collectNotices makes the live view's from the same function
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/Kind.zig')
| -rw-r--r-- | src/Kind.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Kind.zig b/src/Kind.zig index d3feed96..6d4caec6 100644 --- a/src/Kind.zig +++ b/src/Kind.zig @@ -702,8 +702,11 @@ pub fn viewOf(p: *const Pardes, k: u8, id: usize) c.pa_view { const pane = p.panes[id] orelse return out; const r = v.rects[id]; // The live view's share of the pane is in its own fields, another's parked. - const collapsed, const tag_rows, const notices = if (k == p.live) .{ pane.collapsed, pane.tag_rows, pane.notices.span() } else .{ pane.pv[k].collapsed, pane.pv[k].tag_rows, pane.pv[k].notices.span() }; + const collapsed, const tag_rows = if (k == p.live) .{ pane.collapsed, pane.tag_rows } else .{ pane.pv[k].collapsed, pane.pv[k].tag_rows }; if (collapsed) return out; + // Its bands made again, never the copy a step or a park left: they are + // derived, so a client joined from a dump has none. + const notices = pardes.Messages.bands(p, v, pane, tag_rows, r, id).span(); const th = p.theme(); const rgb = struct { fn f(x: [3]u8) u32 { |
