From 3bddd662eac9a7829174f3c54b498bda84df1961 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 1 Oct 2026 02:40:12 -0300 Subject: A Restore, or -l, of a dump naming a ThemeFile asks the host to load it again, as a /ctl write of it does The dump's ThemeFile line went to the settings table, which has no such setting and never asks the host to read a file, so a restored session came back in the default theme. The restore now makes the request a /ctl ThemeFile makes, and the host loads the file. Co-Authored-By: Claude Opus 5.5 --- src/dump.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/dump.zig') diff --git a/src/dump.zig b/src/dump.zig index 983d5894..f8b99ef4 100644 --- a/src/dump.zig +++ b/src/dump.zig @@ -811,6 +811,12 @@ fn changedSettings(p: *Pardes, arena: std.mem.Allocator) ![]const []const u8 { fn applySettings(p: *Pardes, lines: []const []const u8) void { for (lines) |line| { const sp = std.mem.indexOfScalar(u8, line, ' '); + // A ThemeFile is a request the host answers by reading the file, as + // a /ctl write of it is: asked again here, not dropped. + if (std.mem.eql(u8, line[0 .. sp orelse line.len], "ThemeFile")) { + if (sp) |s| colors.requestThemeFile(p, 0, line[s + 1 ..]); + continue; + } const setting = config.Runtime.find(line[0 .. sp orelse line.len]) orelse continue; _ = p.settings.apply(setting, if (sp) |s| line[s + 1 ..] else null); } -- cgit v1.3