From a28b37fb04566c36759edab0da7b1f98dffa6808 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 11:09:06 -0300 Subject: effects out, Pet: src/gui/pet.zig, the Pet word and setting, the window's pet overlay (the triangle overlay holds the cursor's quad alone) and the DumpConfig `# Pet` line go; the root ctl reads LocationsConfig through DumpConfig's writer, so ctl.zig writes no settings line of its own; the Pet behaviour test goes, what it pinned besides the pet (a GUI-only builtin refused at a pane's exec in a terminal's view) now in the GUI-only settings test, with Fonts; the appearance gallery loses its pets Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/ninep/ctl.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ninep') diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig index 8a84e37f..2cfee904 100644 --- a/src/ninep/ctl.zig +++ b/src/ninep/ctl.zig @@ -612,18 +612,18 @@ const e_prompt = "control message needs its argument"; /// is /status's or the DumpConfig window's. fn writeSettings(p: *Pardes, w: *std.Io.Writer) !void { try writeSettingsFor(p, &p.settings, w, builtins.viewCapabilities(p)); - try w.writeAll("LocationsConfig "); - try p.locations_config.write(w); - try w.writeByte('\n'); - if (comptime builtins.Pet.enabled) if (builtins.registry.here(p, .Pet)) try w.print("Pet {s}\n", .{@tagName(p.settings.pet)}); } /// The setting words of `s`, one a line, those a frontend of `caps` takes -/// (the root ctl's: the live view's). +/// (the root ctl's: the live view's), and the session's LocationsConfig. fn writeSettingsFor(p: *Pardes, s: *const config.Runtime, w: *std.Io.Writer, caps: config.Runtime.Capabilities) !void { // DumpConfig's words: a `# Word unsupported` comment for what `caps` lacks. var dump_dir: [1024]u8 = undefined; + var located_buf: [256]u8 = undefined; + var located: std.Io.Writer = .fixed(&located_buf); + try p.locations_config.write(&located); try config.Runtime.writeSettings(w, .{ + .locations = located.buffered(), .theme_name = p.theme().name, .theme_file = pardes.colors.loadedThemeFile(p), .compiled_default_shell = config.defaultShell(), -- cgit v1.3