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:
parent
96ea5c445e
commit
b904207b19
11 changed files with 143 additions and 60 deletions
|
|
@ -66,6 +66,7 @@ ref_tests! {
|
|||
saved_cursor
|
||||
saved_cursor_alt
|
||||
sgr
|
||||
underline
|
||||
}
|
||||
|
||||
fn read_u8<P>(path: P) -> Vec<u8>
|
||||
|
|
|
|||
13
alacritty_terminal/tests/ref/underline/alacritty.recording
Normal file
13
alacritty_terminal/tests/ref/underline/alacritty.recording
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[undeadleech@undeadlap underline]$
[K[undeadleech@undeadlap underline]$ echo -e "\e[4mUNDERLINED\e[0m"
|
||||
[4mUNDERLINED[0m
|
||||
[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[24m
|
||||
[undeadleech@undeadlap underline]$ echo -e "\e[4:3mUNDERLINED\e[21m";mUNDERLINED\e[21m"2mUNDERLINED\e[21m"1mUNDERLINED\e[21m"[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[1Pm"[1Pm"0m"
|
||||
[4:3;21mUNDERLINED[0m
|
||||
[undeadleech@undeadlap underline]$ echo -e "\e[4;4:2mUNDERLINED\e[0m"
|
||||
[4;4:2mUNDERLINED[0m
|
||||
[undeadleech@undeadlap underline]$ echo -e "\e[4;4:2mUNDERLINED\e[0m":;4:2mUNDERLINED\e[0m"1;4:2mUNDERLINED\e[0m"[C[C[C[1P;4:2mUNDERLINED\e[0m"2;4:2mUNDERLINED\e[0m"[C[C[C[C[1PmUNDERLINED\e[0m"1mUNDERLINED\e[0m"
|
||||
[4:2;4:1mUNDERLINED[0m
|
||||
[undeadleech@undeadlap underline]$
|
||||
1
alacritty_terminal/tests/ref/underline/config.json
Normal file
1
alacritty_terminal/tests/ref/underline/config.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"history_size":0}
|
||||
1
alacritty_terminal/tests/ref/underline/grid.json
Normal file
1
alacritty_terminal/tests/ref/underline/grid.json
Normal file
File diff suppressed because one or more lines are too long
1
alacritty_terminal/tests/ref/underline/size.json
Normal file
1
alacritty_terminal/tests/ref/underline/size.json
Normal 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}
|
||||
Loading…
Add table
Add a link
Reference in a new issue