summaryrefslogtreecommitdiff
path: root/core/exec.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 23:51:23 -0300
committerGabriel Schneider <[email protected]>2026-11-20 00:00:00 -0300
commit8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68 (patch)
tree24c4d770b8ac5a11e1f0169f9e0707fda8cde678 /core/exec.zig
parentd236dff22567c2f563756695598678afb84fbef4 (diff)
parenta310585195484b8420f14cff3e736c604f47c11e (diff)
downloadpardes-8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68.tar.gz
pardes-8a1f65a2d374796b9b5559c4aab87c8d1e8f6e68.zip
integration: the ruled renames on the documents and the load-independent tests: pardes-renames (config.Settings, macos.Callbacks, core/ninep/harness.zig, Pane.docked_to and the word Undock) and pardes-merge23; one conflict, in core/CHANGELOG.md, where both sides added Unreleased entries: both kept; no old name left in the tree; tui core-test 848/991 (143 skipped), shell-test 1027/1030, the window builds
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/exec.zig')
-rw-r--r--core/exec.zig16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/exec.zig b/core/exec.zig
index 687faa98..1ec47eb3 100644
--- a/core/exec.zig
+++ b/core/exec.zig
@@ -288,7 +288,7 @@ pub fn withArg(p: *Pardes, txt: []const u8, arg: ?[]const u8) []const u8 {
// A switch (Verbose, Wrap) clicked with some other text
// selected flips, as it does bare: only `on` or `off` is an argument
// for it. What a ctl write gives it is checked strictly instead.
- if (config.Runtime.find(commandText(t))) |setting| switch (setting.action) {
+ if (config.Settings.find(commandText(t))) |setting| switch (setting.action) {
.toggle => if (!std.mem.eql(u8, a, "on") and !std.mem.eql(u8, a, "off")) return txt,
else => {},
};
@@ -688,7 +688,7 @@ pub fn executeFrom(p: *Pardes, id: usize, txt: []const u8, from_body: bool) ?usi
// A builtin or setting this build lacks (Fonts on a terminal) is said,
// never run as a shell command.
const word = cmd[0 .. std.mem.indexOfAny(u8, cmd, " \t") orelse cmd.len];
- if (builtins.absentWhy(word) orelse if (config.Runtime.find(word) != null) @as([]const u8, "GUI-only") else null) |why| {
+ if (builtins.absentWhy(word) orelse if (config.Settings.find(word) != null) @as([]const u8, "GUI-only") else null) |why| {
var said: pardes.Kind.Buf(96) = .{};
p.reportFailure(id, said.print("{s} is {s}, invalid here", .{ word, why }));
return null;
@@ -937,7 +937,7 @@ 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;
- const setting = config.Runtime.find(word[0 .. std.mem.indexOfAny(u8, word, " \t") orelse word.len]);
+ const setting = config.Settings.find(word[0 .. std.mem.indexOfAny(u8, word, " \t") orelse word.len]);
// Saved in a pane, its settings run again and its commands do not:
// a word that is neither (a typo) is still said, as at startup.
if (settings_only and setting == null and std.meta.stringToEnum(Builtin, word[0 .. std.mem.indexOfAny(u8, word, " \t+") orelse word.len]) != null) continue;
@@ -996,7 +996,7 @@ pub fn runBuiltinFrom(p: *Pardes, b: Builtin, id: usize, txt: []const u8, arg: ?
builtins.registry.dispatch(b, c);
}
-pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]const u8) void {
+pub fn applySettingBuiltin(p: *Pardes, setting: config.Settings.Setting, arg: ?[]const u8) void {
const v = p.view();
const previous_tagline_percent = p.settings.font.tagline_percent;
switch (setting.action) {
@@ -1015,7 +1015,7 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]
},
.font => {
if (comptime !font_picker) return;
- const spec = config.Runtime.FontSpec.parse(arg orelse return) orelse return;
+ const spec = config.Settings.FontSpec.parse(arg orelse return) orelse return;
// The session's machine's fonts, a question to its disk: a
// client's replay takes the session's answer, never its own.
const found = pardes.tape.site(.fonts, p.scratch.allocator(), fontNamed, .{ p.scratch.allocator(), spec.name });
@@ -1039,7 +1039,7 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]
var text: pardes.Kind.Buf(340) = .{};
return p.reportFailure(v.active, text.print("Shell: {s}", .{refused}));
}
- if (!p.settings.apply(p.tape, setting, want, p.sessionHome())) p.reportFailure(v.active, "Shell: takes " ++ comptime config.Runtime.takes(.shell).?);
+ if (!p.settings.apply(p.tape, setting, want, p.sessionHome())) p.reportFailure(v.active, "Shell: takes " ++ comptime config.Settings.takes(.shell).?);
},
// Bare, each says its value, as acme's Tab says the width.
inline .tab, .callstack_depth => |_, tag| if (arg == null) {
@@ -1047,14 +1047,14 @@ pub fn applySettingBuiltin(p: *Pardes, setting: config.Runtime.Setting, arg: ?[]
return p.setMessage(.at(v.active), said.print("{s} {d}", .{ setting.word, @field(p.settings, @tagName(tag)) }));
} else if (!p.settings.apply(p.tape, setting, arg, p.sessionHome())) {
var said: pardes.Kind.Buf(96) = .{};
- p.reportFailure(v.active, said.print("{s}{s}: takes {s}", .{ setting.word, if (tag == .tab) ": invalid tab width" else "", comptime config.Runtime.takes(tag).? }));
+ p.reportFailure(v.active, said.print("{s}{s}: takes {s}", .{ setting.word, if (tag == .tab) ": invalid tab width" else "", comptime config.Settings.takes(tag).? }));
},
// Said with what it takes: its words, its range.
else => if (!p.settings.apply(p.tape, setting, arg, p.sessionHome())) {
var buf: [160]u8 = undefined;
var text: std.Io.Writer = .fixed(&buf);
// A list of values too long for the row is cut.
- (if (config.Runtime.takes(setting.action)) |values| text.print("{s}: takes {s}", .{ setting.word, values }) else text.print("{s}: does not take that value", .{setting.word})) catch {};
+ (if (config.Settings.takes(setting.action)) |values| text.print("{s}: takes {s}", .{ setting.word, values }) else text.print("{s}: does not take that value", .{setting.word})) catch {};
p.reportFailure(v.active, text.buffered());
},
}