summaryrefslogtreecommitdiff
path: root/src/exec.zig
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/exec.zig
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/exec.zig')
-rw-r--r--src/exec.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/exec.zig b/src/exec.zig
index 722ad3de..f3819a83 100644
--- a/src/exec.zig
+++ b/src/exec.zig
@@ -1005,7 +1005,11 @@ fn applyInitText(p: *Pardes, text: []const u8, settings_only: bool) void {
// `#` starts a comment only at a line's start: a value may hold one
// (`#ff0000`).
if (word.len == 0 or isComment(word)) continue;
- if (settings_only and config.Runtime.find(word[0 .. std.mem.indexOfAny(u8, word, " \t") orelse word.len]) == null) continue;
+ const setting = config.Runtime.find(word[0 .. std.mem.indexOfAny(u8, word, " \t") orelse word.len]);
+ if (settings_only and setting == null) continue;
+ // One init file serves the window and the terminal: a setting only
+ // the other has (Font, GripWidth in a terminal) is no failure here.
+ if (setting) |s| if (!s.enabled(builtins.capabilities)) continue;
const failures = p.fs.failures;
const known = executeBuiltinLine(p, p.active, line);
if (known and p.fs.failures == failures) continue;