mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
Changed behaviour of bold-color (#7871)
Continuation of discussion in https://github.com/ghostty-org/ghostty/discussions/3134 This changes the behaviour of the new bold-color option to only affect the default foreground text when set to a static colour. By using a static colour, the remaining colours are rendered as bright.
This commit is contained in:
@ -2893,8 +2893,8 @@ else
|
||||
/// This can be set to a specific color, using the same format as
|
||||
/// `background` or `foreground` (e.g. `#RRGGBB` but other formats
|
||||
/// are also supported; see the aforementioned documentation). If a
|
||||
/// specific color is set, this color will always be used for all
|
||||
/// bold text regardless of the terminal's color scheme.
|
||||
/// specific color is set, this color will always be used for the default
|
||||
/// bold text color. It will set the rest of the bold colors to `bright`.
|
||||
///
|
||||
/// This can also be set to `bright`, which uses the bright color palette
|
||||
/// for bold text. For example, if the text is red, then the bold will
|
||||
|
@ -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];
|
||||
|
Reference in New Issue
Block a user