diff options
Diffstat (limited to 'core/dump.zig')
| -rw-r--r-- | core/dump.zig | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/dump.zig b/core/dump.zig index 0cefa157..b1fad70e 100644 --- a/core/dump.zig +++ b/core/dump.zig @@ -381,9 +381,12 @@ pub fn check(gpa: std.mem.Allocator, bytes: []const u8, why: *[256]u8) !void { /// The core the dump `bytes` is, and nothing more: no shell started, no /// file watched, nothing asked of a host (`revive` does that). What another /// build's dump could not give is said in `notes` when given. `opts` are -/// this process's (its allocators, paths and name), not the dump's. +/// this process's (its allocators, paths and name), not the dump's. Its +/// chrome is the restored theme's: the colours are local, never dumped. pub fn load(gpa: std.mem.Allocator, opts: Options, bytes: []const u8, notes: ?*std.ArrayList(u8)) !*Pardes { - return loadKnowing(gpa, opts, bytes, notes, null); + const p = try loadKnowing(gpa, opts, bytes, notes, null); + colors.finishThemeInitialization(p); + return p; } /// `load`, with which panes' files were on disk when it was dumped. @@ -1010,6 +1013,10 @@ pub fn plainHere(p: *Pardes, id: usize, old: *Kind.Slot, ops: *const Kind.Ops) ! s.selection = try p.gpa.dupe(u8, old.selection); // (and its place: the open's own `where` is of a block not yet the session's) const kept = .{ old.next_tick, old.views, old.focused, old.state, old.where_text }; + // The count of writes outside the copy stays the session's, as dumped: + // this open is the join's, no step the session took (Kind.reopen). + const outside = p.outside; + defer p.outside = outside; if (!Kind.reopen(p, id, s, old.file)) return error.KindRefused; // Its block the session's, byte for byte (its record), never through // the kind's load, which may tidy it. |
