diff options
Diffstat (limited to 'alacritty_terminal/src/term/color.rs')
-rw-r--r-- | alacritty_terminal/src/term/color.rs | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/alacritty_terminal/src/term/color.rs b/alacritty_terminal/src/term/color.rs index 8626cda5..88af6de6 100644 --- a/alacritty_terminal/src/term/color.rs +++ b/alacritty_terminal/src/term/color.rs @@ -257,24 +257,24 @@ impl<'a> From<&'a Colors> for List { impl List { pub fn fill_named(&mut self, colors: &Colors) { // Normals. - self[ansi::NamedColor::Black] = colors.normal().black; - self[ansi::NamedColor::Red] = colors.normal().red; - self[ansi::NamedColor::Green] = colors.normal().green; - self[ansi::NamedColor::Yellow] = colors.normal().yellow; - self[ansi::NamedColor::Blue] = colors.normal().blue; - self[ansi::NamedColor::Magenta] = colors.normal().magenta; - self[ansi::NamedColor::Cyan] = colors.normal().cyan; - self[ansi::NamedColor::White] = colors.normal().white; + self[ansi::NamedColor::Black] = colors.normal.black; + self[ansi::NamedColor::Red] = colors.normal.red; + self[ansi::NamedColor::Green] = colors.normal.green; + self[ansi::NamedColor::Yellow] = colors.normal.yellow; + self[ansi::NamedColor::Blue] = colors.normal.blue; + self[ansi::NamedColor::Magenta] = colors.normal.magenta; + self[ansi::NamedColor::Cyan] = colors.normal.cyan; + self[ansi::NamedColor::White] = colors.normal.white; // Brights. - self[ansi::NamedColor::BrightBlack] = colors.bright().black; - self[ansi::NamedColor::BrightRed] = colors.bright().red; - self[ansi::NamedColor::BrightGreen] = colors.bright().green; - self[ansi::NamedColor::BrightYellow] = colors.bright().yellow; - self[ansi::NamedColor::BrightBlue] = colors.bright().blue; - self[ansi::NamedColor::BrightMagenta] = colors.bright().magenta; - self[ansi::NamedColor::BrightCyan] = colors.bright().cyan; - self[ansi::NamedColor::BrightWhite] = colors.bright().white; + self[ansi::NamedColor::BrightBlack] = colors.bright.black; + self[ansi::NamedColor::BrightRed] = colors.bright.red; + self[ansi::NamedColor::BrightGreen] = colors.bright.green; + self[ansi::NamedColor::BrightYellow] = colors.bright.yellow; + self[ansi::NamedColor::BrightBlue] = colors.bright.blue; + self[ansi::NamedColor::BrightMagenta] = colors.bright.magenta; + self[ansi::NamedColor::BrightCyan] = colors.bright.cyan; + self[ansi::NamedColor::BrightWhite] = colors.bright.white; self[ansi::NamedColor::BrightForeground] = colors.primary.bright_foreground.unwrap_or(colors.primary.foreground); @@ -299,14 +299,14 @@ impl List { }, None => { trace!("Deriving dim colors from normal colors"); - self[ansi::NamedColor::DimBlack] = colors.normal().black * DIM_FACTOR; - self[ansi::NamedColor::DimRed] = colors.normal().red * DIM_FACTOR; - self[ansi::NamedColor::DimGreen] = colors.normal().green * DIM_FACTOR; - self[ansi::NamedColor::DimYellow] = colors.normal().yellow * DIM_FACTOR; - self[ansi::NamedColor::DimBlue] = colors.normal().blue * DIM_FACTOR; - self[ansi::NamedColor::DimMagenta] = colors.normal().magenta * DIM_FACTOR; - self[ansi::NamedColor::DimCyan] = colors.normal().cyan * DIM_FACTOR; - self[ansi::NamedColor::DimWhite] = colors.normal().white * DIM_FACTOR; + self[ansi::NamedColor::DimBlack] = colors.normal.black * DIM_FACTOR; + self[ansi::NamedColor::DimRed] = colors.normal.red * DIM_FACTOR; + self[ansi::NamedColor::DimGreen] = colors.normal.green * DIM_FACTOR; + self[ansi::NamedColor::DimYellow] = colors.normal.yellow * DIM_FACTOR; + self[ansi::NamedColor::DimBlue] = colors.normal.blue * DIM_FACTOR; + self[ansi::NamedColor::DimMagenta] = colors.normal.magenta * DIM_FACTOR; + self[ansi::NamedColor::DimCyan] = colors.normal.cyan * DIM_FACTOR; + self[ansi::NamedColor::DimWhite] = colors.normal.white * DIM_FACTOR; }, } } @@ -319,7 +319,7 @@ impl List { for b in 0..6 { // Override colors 16..232 with the config (if present). if let Some(indexed_color) = - colors.indexed_colors.iter().find(|ic| ic.index == index as u8) + colors.indexed_colors.iter().find(|ic| ic.index() == index as u8) { self[index] = indexed_color.color; } else { @@ -346,7 +346,7 @@ impl List { // Override colors 232..256 with the config (if present). if let Some(indexed_color) = - colors.indexed_colors.iter().find(|ic| ic.index == color_index) + colors.indexed_colors.iter().find(|ic| ic.index() == color_index) { self[index] = indexed_color.color; index += 1; |