aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/display
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2021-09-15 01:08:10 -0600
committerJosh Rahm <rahm@google.com>2021-09-15 01:18:33 -0600
commit2ded77656793f340440fe0efb54119697bb22a1a (patch)
treedb9e584a2882f2137ff029800cf35a61a7502e65 /alacritty/src/display
parentd2b578e011d62311125033d895060986a96d3c88 (diff)
downloadr-alacritty-2ded77656793f340440fe0efb54119697bb22a1a.tar.gz
r-alacritty-2ded77656793f340440fe0efb54119697bb22a1a.tar.bz2
r-alacritty-2ded77656793f340440fe0efb54119697bb22a1a.zip
Added ability to set the special color for the undercur and underlines using the standard ANSI code 59
Diffstat (limited to 'alacritty/src/display')
-rw-r--r--alacritty/src/display/content.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs
index 09116508..9f52e74e 100644
--- a/alacritty/src/display/content.rs
+++ b/alacritty/src/display/content.rs
@@ -189,6 +189,7 @@ pub struct RenderableCell {
pub point: Point<usize>,
pub fg: Rgb,
pub bg: Rgb,
+ pub sp: Rgb, // Special
pub bg_alpha: f32,
pub flags: Flags,
}
@@ -198,6 +199,11 @@ impl RenderableCell {
// Lookup RGB values.
let mut fg = Self::compute_fg_rgb(content, cell.fg, cell.flags);
let mut bg = Self::compute_bg_rgb(content, cell.bg);
+ let mut sp = if cell.sp == Color::Named(NamedColor::Foreground) {
+ fg
+ } else {
+ Self::compute_bg_rgb(content, cell.sp)
+ };
let mut bg_alpha = if cell.flags.contains(Flags::INVERSE) {
mem::swap(&mut fg, &mut bg);
@@ -263,6 +269,7 @@ impl RenderableCell {
point,
fg,
bg,
+ sp,
}
}