Fix dimming of indexed colors
It seems like the list of colors might have changed a bit, leading to indexed colors not being transformed into their dim colors correctly. To prevent this from happening in the future, the dimming for colors in the range '0..=7' is now performed by offsetting them from the 'NamedColor::DimBlack'. Since this is the first dimmed color, this should always work as long as all dimmed colors are added in the correct order.
This commit is contained in:
parent
de9ed25966
commit
9e71002e40
|
@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Wide characters sometimes being cut off
|
- Wide characters sometimes being cut off
|
||||||
- Preserve vi mode across terminal `reset`
|
- Preserve vi mode across terminal `reset`
|
||||||
- Escapes `CSI Ps b` and `CSI Ps Z` with large parameters locking up Alacritty
|
- Escapes `CSI Ps b` and `CSI Ps Z` with large parameters locking up Alacritty
|
||||||
|
- Dimming colors which use the indexed `CSI 38 : 5 : Ps m` notation
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
|
|
|
@ -401,7 +401,7 @@ impl RenderableCell {
|
||||||
) {
|
) {
|
||||||
(true, Flags::BOLD, 0..=7) => idx as usize + 8,
|
(true, Flags::BOLD, 0..=7) => idx as usize + 8,
|
||||||
(false, Flags::DIM, 8..=15) => idx as usize - 8,
|
(false, Flags::DIM, 8..=15) => idx as usize - 8,
|
||||||
(false, Flags::DIM, 0..=7) => idx as usize + 260,
|
(false, Flags::DIM, 0..=7) => NamedColor::DimBlack as usize + idx as usize,
|
||||||
_ => idx as usize,
|
_ => idx as usize,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue