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:
Joseph Adams
2022-01-13 17:27:02 +01:00
parent ecf4fcdeb0
commit a2c4f830b3
5 changed files with 8 additions and 8 deletions

View File

@@ -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: