Changed behaviour of bold-color

This commit is contained in:
Robert Ian Hawdon
2025-07-09 11:33:12 +01:00
parent b90deebfb2
commit 57fdfe76bb

View File

@ -154,15 +154,12 @@ pub const Style = struct {
.palette => |idx| palette: {
if (self.flags.bold) {
if (opts.bold) |bold| switch (bold) {
.color => |v| break :palette v.toTerminalRGB(),
.bright => {
const bright_offset = @intFromEnum(color.Name.bright_black);
if (idx < bright_offset) {
break :palette opts.palette[idx + bright_offset];
}
},
};
if (opts.bold) |_| {
const bright_offset = @intFromEnum(color.Name.bright_black);
if (idx < bright_offset) {
break :palette opts.palette[idx + bright_offset];
}
}
}
break :palette opts.palette[idx];