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