diff options
Diffstat (limited to 'alacritty_terminal/src/term')
-rw-r--r-- | alacritty_terminal/src/term/cell.rs | 3 | ||||
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/alacritty_terminal/src/term/cell.rs b/alacritty_terminal/src/term/cell.rs index 2191ced2..467d955a 100644 --- a/alacritty_terminal/src/term/cell.rs +++ b/alacritty_terminal/src/term/cell.rs @@ -62,6 +62,7 @@ pub struct Cell { pub c: char, pub fg: Color, pub bg: Color, + pub sp: Color, pub flags: Flags, #[serde(default)] extra: Option<Box<CellExtra>>, @@ -74,6 +75,7 @@ impl Default for Cell { c: ' ', bg: Color::Named(NamedColor::Background), fg: Color::Named(NamedColor::Foreground), + sp: Color::Named(NamedColor::Foreground), flags: Flags::empty(), extra: None, } @@ -116,6 +118,7 @@ impl GridCell for Cell { (self.c == ' ' || self.c == '\t') && self.bg == Color::Named(NamedColor::Background) && self.fg == Color::Named(NamedColor::Foreground) + && self.sp == Color::Named(NamedColor::Foreground) && !self.flags.intersects( Flags::INVERSE | Flags::UNDERLINE diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index 367f39f9..85b76937 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -783,6 +783,7 @@ impl<T> Term<T> { let c = self.grid.cursor.charsets[self.active_charset].map(c); let fg = self.grid.cursor.template.fg; let bg = self.grid.cursor.template.bg; + let sp = self.grid.cursor.template.sp; let flags = self.grid.cursor.template.flags; let mut cursor_cell = self.grid.cursor_cell(); @@ -812,6 +813,7 @@ impl<T> Term<T> { cursor_cell.c = c; cursor_cell.fg = fg; cursor_cell.bg = bg; + cursor_cell.sp = sp; cursor_cell.flags = flags; } } @@ -1494,9 +1496,11 @@ impl<T: EventListener> Handler for Term<T> { match attr { Attr::Foreground(color) => cursor.template.fg = color, Attr::Background(color) => cursor.template.bg = color, + Attr::Special(color) => cursor.template.sp = color, Attr::Reset => { cursor.template.fg = Color::Named(NamedColor::Foreground); cursor.template.bg = Color::Named(NamedColor::Background); + cursor.template.sp = Color::Named(NamedColor::Foreground); cursor.template.flags = Flags::empty(); }, Attr::Reverse => cursor.template.flags.insert(Flags::INVERSE), |