1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2025-11-06 22:44:18 -05:00

Add support for double underlines

This adds support for double underlines using the colon separated escape
sequence `CSI 4 : 2 m`.

Alacritty will now also always fallback to the normal underline in case
any of the other underlines like the undercurl are specified. The escape
sequence `CSI 4 : 0 m` can now be used to clear all underlines.

Some terminals support `CSI 21 m` for double underline, but since
Alacritty already uses that as cancel bold which is a little more
consistent, that behavior has not changed. So the colon separated
variant must be used.
This commit is contained in:
Christian Duerr 2020-08-12 16:05:22 +00:00 committed by GitHub
parent 96ea5c445e
commit b904207b19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 143 additions and 60 deletions

View file

@ -66,6 +66,7 @@ ref_tests! {
saved_cursor
saved_cursor_alt
sgr
underline
}
fn read_u8<P>(path: P) -> Vec<u8>

View file

@ -0,0 +1,13 @@
[undeadleech@undeadlap underline]$ [undeadleech@undeadlap underline]$ echo -e "\e[4mUNDERLINED\e[0m"
UNDERLINED
[undeadleech@undeadlap underline]$ echo -e "\e[4:1mUNDERLINED\e[4:0m"
[4:1mUNDERLINED[4:0m
[undeadleech@undeadlap underline]$ echo -e "\e[4:2mUNDERLINED\e[24m"
[4:2mUNDERLINED
[undeadleech@undeadlap underline]$ echo -e "\e[4:3mUNDERLINED\e[21m";mUNDERLINED\e[21m"2mUNDERLINED\e[21m"1mUNDERLINED\e[21m"m"m"0m"
[4:3;21mUNDERLINED
[undeadleech@undeadlap underline]$ echo -e "\e[4;4:2mUNDERLINED\e[0m"
[4;4:2mUNDERLINED
[undeadleech@undeadlap underline]$ echo -e "\e[4;4:2mUNDERLINED\e[0m":;4:2mUNDERLINED\e[0m"1;4:2mUNDERLINED\e[0m";4:2mUNDERLINED\e[0m"2;4:2mUNDERLINED\e[0m"mUNDERLINED\e[0m"1mUNDERLINED\e[0m"
[4:2;4:1mUNDERLINED
[undeadleech@undeadlap underline]$

View file

@ -0,0 +1 @@
{"history_size":0}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"width":939.0,"height":503.0,"cell_width":8.0,"cell_height":16.0,"padding_x":5.0,"padding_y":3.0,"dpr":1.0}