From 005178177a1ddb2eb2f1af5fad36e2717758ee8e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 31 Jul 2026 19:02:04 -0300 Subject: the gui wears any monospace font on the machine --- src/pardes.zig | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index eb2c8402..760a452f 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -6292,16 +6292,24 @@ pub const Pardes = struct { defer p.exec_depth -= 1; // The builtins that take an ARGUMENT match their name with a TAIL: // `Restore `, `Find `, `Grep `, `Rename `, - // `WsSymbols `, `Theme `, and the two verbs themselves — - // `Look `, `Exec `, which is what makes `` @`Look .` `` nest - // (the tail goes straight back through here). Every other name must - // match WHOLE, so `Kill foo` is a shell command and not Kill. + // `WsSymbols `, `Theme `, `Font ` (gui only), and the + // two verbs themselves — `Look `, `Exec `, which is what + // makes `` @`Look .` `` nest (the tail goes straight back through + // here). Every other name must match WHOLE, so `Kill foo` is a shell + // command and not Kill. const sp = std.mem.indexOfAny(u8, cmd, " \t"); const bi: ?Builtin = std.meta.stringToEnum(Builtin, cmd) orelse blk: { const head = std.meta.stringToEnum(Builtin, cmd[0 .. sp orelse break :blk null]) orelse break :blk null; break :blk switch (head) { .Restore, .Find, .Grep, .Rename, .WsSymbols, .Theme, .Look, .Exec => head, - else => null, + // Font is a BRANCH and not another name in that prong for the + // reason output_pane.traits has the same shape: it is not in + // the enum at all off the gui, and a comptime-false `if` is + // the one form that is not analysed there. + else => { + if (platform == .gui) if (head == .Font) break :blk head; + break :blk null; + }, }; }; if (bi) |b| { -- cgit v1.3