mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
Enable use of higher options for underlining text.
In `Colored and styled underlines` it's proposed that the SGR codes \e[4:4m and \e[4:5m are used to add a dotted or dashed underline to the rendering context respectively. This commit prepares the necessary changes to add the two additional underline style, while still rendering them as a normal underline and curly underline.
This commit is contained in:
@@ -90,7 +90,7 @@ START_ALLOW_CASE_RANGE
|
||||
case 3:
|
||||
self->italic = true; break;
|
||||
case 4:
|
||||
if (i < count) { self->decoration = MIN(3, params[i]); i++; }
|
||||
if (i < count) { self->decoration = MIN(5, params[i]); i++; }
|
||||
else self->decoration = 1;
|
||||
break;
|
||||
case 7:
|
||||
@@ -161,7 +161,7 @@ apply_sgr_to_cells(GPUCell *first_cell, unsigned int cell_count, int *params, un
|
||||
S(italic, true);
|
||||
case 4: {
|
||||
uint8_t val = 1;
|
||||
if (i < count) { val = MIN(3, params[i]); i++; }
|
||||
if (i < count) { val = MIN(5, params[i]); i++; }
|
||||
S(decoration, val);
|
||||
}
|
||||
case 7:
|
||||
|
||||
Reference in New Issue
Block a user