diff options
Diffstat (limited to 'src/replica.zig')
| -rw-r--r-- | src/replica.zig | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/replica.zig b/src/replica.zig index f84e61e8..b1b0514c 100644 --- a/src/replica.zig +++ b/src/replica.zig @@ -762,12 +762,14 @@ pub const Replica = struct { const c = try pardes.dump.load(epoch, o, bytes, null); // The chrome's colours are local, never dumped: the restored theme's. pardes.colors.finishThemeInitialization(c); - // It runs a plain kind's code of its own (Addon.plainOps), each pane - // of one opened here from its record; another's panes are Shadows. - for (c.kinds.kinds[0..c.kinds.n], c.kinds.ops[0..c.kinds.n]) |*e, *ops| ops.* = pardes.Addon.plainOps(e); - @memset(c.kinds.ops[c.kinds.n..], null); - for (c.panes, 0..) |pslot, at| if (pslot) |pane| if (pane.addon) |s| if (c.kinds.byName(s.nameOf())) |k| if (c.kinds.ops[k]) |ops| { - pane.addon = try pardes.dump.plainHere(c, at, s, ops); + // It runs a plain kind's code of its own (Addon.plainOps), loaded + // at its first pane, each opened here from its record; another's + // panes are Shadows. + c.kinds.ops = @splat(null); + for (c.panes, 0..) |pslot, at| if (pslot) |pane| if (pane.addon) |s| if (c.kinds.byName(s.nameOf())) |k| { + if (c.kinds.ops[k] == null) c.kinds.ops[k] = pardes.Addon.plainOps(&c.kinds.kinds[k]); + // Refused (its file not here): the line saying it does not run here. + if (c.kinds.ops[k]) |ops| pane.addon = pardes.dump.plainHere(c, at, s, ops) catch s; }; // What loading queued (a watch, a theme asked for) is the // authority's errand, done there already: the session was dumped |
