aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/ansi.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2022-02-14 19:10:13 +0300
committerGitHub <noreply@github.com>2022-02-14 19:10:13 +0300
commited5dbc11183030367c9a510a9706f6791b54430f (patch)
tree3fd9bf595e164c8d89fb1215c8d68dc2d913324e /alacritty_terminal/src/ansi.rs
parent774eb03f4ff01f692f645d930da54990bf92d19c (diff)
downloadalacritty-ed5dbc11183030367c9a510a9706f6791b54430f.tar.gz
alacritty-ed5dbc11183030367c9a510a9706f6791b54430f.zip
Add support for dashed and dotted underlines
This finishes implementation of underline styles provided by `CSI 4 : [1-5] m` escape sequence.
Diffstat (limited to 'alacritty_terminal/src/ansi.rs')
-rw-r--r--alacritty_terminal/src/ansi.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/alacritty_terminal/src/ansi.rs b/alacritty_terminal/src/ansi.rs
index 91dd3540..8475685d 100644
--- a/alacritty_terminal/src/ansi.rs
+++ b/alacritty_terminal/src/ansi.rs
@@ -772,6 +772,10 @@ pub enum Attr {
DoubleUnderline,
/// Undercurled text.
Undercurl,
+ /// Dotted underlined text.
+ DottedUnderline,
+ /// Dashed underlined text.
+ DashedUnderline,
/// Blink cursor slowly.
BlinkSlow,
/// Blink cursor fast.
@@ -1332,6 +1336,8 @@ fn attrs_from_sgr_parameters(params: &mut ParamsIter<'_>) -> Vec<Option<Attr>> {
[4, 0] => Some(Attr::CancelUnderline),
[4, 2] => Some(Attr::DoubleUnderline),
[4, 3] => Some(Attr::Undercurl),
+ [4, 4] => Some(Attr::DottedUnderline),
+ [4, 5] => Some(Attr::DashedUnderline),
[4, ..] => Some(Attr::Underline),
[5] => Some(Attr::BlinkSlow),
[6] => Some(Attr::BlinkFast),