diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-18 08:29:46 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-18 08:29:46 -0300 |
| commit | 5c5e0102f92938f433a3465c92818be810c1ef78 (patch) | |
| tree | 379cf5e47f2e281934236482d7a5f78db732b18b /src/Addon.zig | |
| parent | 8640d280ebc48b0d2658aa13bee2f9ad933c39f3 (diff) | |
| parent | 3350156db428656fa8e583d1971663e1c4a215b0 (diff) | |
| download | pardes-5c5e0102f92938f433a3465c92818be810c1ef78.tar.gz pardes-5c5e0102f92938f433a3465c92818be810c1ef78.zip | |
integration: the client path's round 1 (the tty client drawing as the own terminal does, a detached session's deltas a unit a frame, the window client's wait, pardes-gui --detach as pardes) with addons in a client part 2 (a draw, ABI 3.2; the image kind where it is shown): no conflict; tui core-test 819/958 (139 skipped), shell-test 993/996, behaviour-test 273/273, replicas pass, pane-test 180/181; the window's suites and its frame corpus NOT run on this merge yet (disk)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'src/Addon.zig')
| -rw-r--r-- | src/Addon.zig | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Addon.zig b/src/Addon.zig index 16c38758..398ec415 100644 --- a/src/Addon.zig +++ b/src/Addon.zig @@ -343,7 +343,12 @@ fn listed(data: []const u8, path: []const u8, n: usize, why: *Why) Loaded { /// library loaded at the first pane of its kind, from the file the start /// listed it from (`listed`); null, and why, when it will not load. pub fn need(r: *Kind.Registry, k: u8, why: *Why) ?*const Kind.Ops { - if (r.ops[k] != null or tape.replaying()) return r.ops[k]; + if (r.ops[k] != null) return r.ops[k]; + // A client's: its own code for a plain kind, loaded at its first pane. + if (tape.replaying()) { + r.ops[k] = plainOps(&r.kinds[k]); + return r.ops[k]; + } const e = &r.kinds[k]; for (found[0..nfound], 0..) |*l, i| if (l.why.len == 0 and std.mem.eql(u8, &l.hash, &e.hash) and std.mem.eql(u8, l.path, e.path.slice())) { if (l.ops == 0) l.ops = loadListed(i, why) orelse return null; @@ -617,7 +622,8 @@ pub fn take(r: *Kind.Registry, l: Loaded, except: []const u8) ?[]const u8 { } e.why.set("loaded"); // A client's: its own code for a plain kind, or none (the session's). - r.ops[r.n] = if (tape.replaying()) plainOps(e) else @ptrFromInt(l.ops); + // A client's code for a plain kind is loaded at its first pane (`need`). + r.ops[r.n] = if (tape.replaying()) null else @ptrFromInt(l.ops); for (l.words) |w| { r.words[r.nwords] = .{ .kind = r.n, .arg = w.arg, .opens = w.opens }; r.words[r.nwords].name.set(w.name); |
