summaryrefslogtreecommitdiff
path: root/src/ninep
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-01 11:17:09 -0300
committerGabriel Schneider <[email protected]>2026-10-01 11:18:32 -0300
commit63d66e82a4ebbdf11cd12f8bc6f002075617fb94 (patch)
tree692ef8bc72bab2955ab347b291714b5eff79f72d /src/ninep
parent36a9bfbaba649da3d988608f1cc7834e567df95d (diff)
downloadpardes-63d66e82a4ebbdf11cd12f8bc6f002075617fb94.tar.gz
pardes-63d66e82a4ebbdf11cd12f8bc6f002075617fb94.zip
A setting only the other frontend has (Font, GripWidth in a terminal) is passed over in the init file, not failed: one init file serves the window and the terminal
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep')
-rw-r--r--src/ninep/ctl.zig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ninep/ctl.zig b/src/ninep/ctl.zig
index d4751191..adfc91fa 100644
--- a/src/ninep/ctl.zig
+++ b/src/ninep/ctl.zig
@@ -4561,6 +4561,16 @@ test "the init file reads past a BOM, and every line it fails is a notice and an
try testing.expect(th.logHas(p, "err - init file line 5: "));
}
+test "a setting the other frontend has is passed over in the init file, not failed" {
+ const other = for (config.Runtime.settings) |s| {
+ if (!s.enabled(pardes.builtins.capabilities)) break s.word;
+ } else return; // this frontend has them all
+ var text: [64]u8 = undefined;
+ const p = try Pardes.init(testing.allocator, .{ .tty_only = true, .startup_config = try std.fmt.bufPrint(&text, "{s} 1\n", .{other}) });
+ defer p.deinit();
+ try testing.expect(!th.logHas(p, "init file line"));
+}
+
test "the init file saved in a pane applies its settings again, and runs none of its commands twice" {
const p = try Pardes.init(testing.allocator, .{ .tty_only = true, .startup_config = "Theme dusk\n", .startup_config_path = "/tmp/pardes-init-test/init" });
defer p.deinit();