diff options
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index 90af5ce7..17f64099 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -802,6 +802,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(); @@ -831,6 +832,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; } } @@ -1513,9 +1515,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), @@ -1528,14 +1532,40 @@ impl<T: EventListener> Handler for Term<T> { Attr::CancelItalic => cursor.template.flags.remove(Flags::ITALIC), Attr::Underline => { cursor.template.flags.remove(Flags::DOUBLE_UNDERLINE); + cursor.template.flags.remove(Flags::UNDERCURL); + cursor.template.flags.remove(Flags::DOTTED_UNDERLINE); cursor.template.flags.insert(Flags::UNDERLINE); }, Attr::DoubleUnderline => { cursor.template.flags.remove(Flags::UNDERLINE); + cursor.template.flags.remove(Flags::UNDERCURL); + cursor.template.flags.remove(Flags::DOTTED_UNDERLINE); cursor.template.flags.insert(Flags::DOUBLE_UNDERLINE); }, + Attr::Undercurl => { + cursor.template.flags.remove(Flags::UNDERLINE); + cursor.template.flags.remove(Flags::DOUBLE_UNDERLINE); + cursor.template.flags.remove(Flags::DOTTED_UNDERLINE); + cursor.template.flags.insert(Flags::UNDERCURL); + }, + Attr::DottedUnderline => { + cursor.template.flags.remove(Flags::UNDERLINE); + cursor.template.flags.remove(Flags::DOUBLE_UNDERLINE); + cursor.template.flags.remove(Flags::UNDERCURL); + cursor.template.flags.insert(Flags::DOTTED_UNDERLINE); + }, Attr::CancelUnderline => { - cursor.template.flags.remove(Flags::UNDERLINE | Flags::DOUBLE_UNDERLINE); + cursor.template.flags.remove( + Flags::UNDERLINE | + Flags::DOUBLE_UNDERLINE | + Flags::UNDERCURL | + Flags::DOTTED_UNDERLINE); + }, + Attr::Overline => { + cursor.template.flags.insert(Flags::OVERLINE); + }, + Attr::CancelOverline => { + cursor.template.flags.remove(Flags::OVERLINE); }, Attr::Hidden => cursor.template.flags.insert(Flags::HIDDEN), Attr::CancelHidden => cursor.template.flags.remove(Flags::HIDDEN), |