diff options
Diffstat (limited to 'src/exec.zig')
| -rw-r--r-- | src/exec.zig | 6 |
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; |
