summaryrefslogtreecommitdiff
path: root/src/Output.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 10:31:15 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commit5fd713889b6bdeb27c58941b77266c9336bf7b7d (patch)
tree8b8ad1c1a0beb814aa3ad63a8790b554fb09c599 /src/Output.zig
parent2d0c506583d18d6f004fc117282deb2faea1d17e (diff)
downloadpardes-5fd713889b6bdeb27c58941b77266c9336bf7b7d.tar.gz
pardes-5fd713889b6bdeb27c58941b77266c9336bf7b7d.zip
ThemeSel is Themes and FontSel is Fonts; the old words still work in init files and dumps
The user asked for the plainer words. Every use is renamed: the builtins, leader paths, /commands, the docs and tutor, tests, and the themesel golden, re-recorded. An init file's ThemeSel or FontSel runs the new word and says `ThemeSel: renamed to Themes`, as ColumnTags is said; a dump naming an output pane by the old word restores it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/Output.zig')
-rw-r--r--src/Output.zig9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Output.zig b/src/Output.zig
index dd6ab92a..a75718bf 100644
--- a/src/Output.zig
+++ b/src/Output.zig
@@ -250,6 +250,9 @@ pub fn fromWord(w: []const u8) ?Origin {
if (std.mem.eql(u8, w, "/")) return .search;
if (std.mem.eql(u8, w, config.errors_buffer)) return .errors;
if (std.mem.eql(u8, w, config.pdf_links_buffer)) return .pdf_links;
+ // A dump from before the rename names them by their old words.
+ if (std.mem.eql(u8, w, "ThemeSel")) return .{ .cmd = .Themes };
+ if (builtins.capabilities.font_picker) if (std.mem.eql(u8, w, "FontSel")) return .{ .cmd = .Fonts };
if (std.meta.stringToEnum(Builtin, w)) |b|
if (builtins.registry.outputTraits(b) != null) return .{ .cmd = b };
if (std.meta.stringToEnum(lsp.Kind, w)) |k| return .{ .query = k };
@@ -591,13 +594,13 @@ pub fn openThemes(p: *Pardes, id: usize) !void {
try out.writer.print(comptime config.Runtime.findAction(.theme).?.word ++ " {s}\n", .{t.name});
}
const content = try out.toOwnedSlice();
- try openStepped(p, id, .{ .cmd = .ThemeSel }, content);
+ try openStepped(p, id, .{ .cmd = .Themes }, content);
}
pub fn isWalkRow(file: *const File.State, row: usize, line: []const u8) bool {
const state = file.output orelse return true;
if (usesLocationsConfig(state.from)) return isResultRow(file, row);
- if (!std.meta.eql(state.from, Origin{ .cmd = .ThemeSel })) return true;
+ if (!std.meta.eql(state.from, Origin{ .cmd = .Themes })) return true;
// Section labels are for reading, not stops in the command walk.
return std.mem.startsWith(u8, std.mem.trimStart(u8, line, " \t"), comptime config.Runtime.findAction(.theme).?.word ++ " ");
}
@@ -611,7 +614,7 @@ pub fn openFonts(p: *Pardes, id: usize) !void {
for (font_list) |f|
try out.writer.print(comptime config.Runtime.findAction(.font).?.word ++ " {s}\n", .{f.name});
const content = try out.toOwnedSlice();
- try openStepped(p, id, .{ .cmd = .FontSel }, content);
+ try openStepped(p, id, .{ .cmd = .Fonts }, content);
}
}