diff --git a/CHANGELOG.md b/CHANGELOG.md index b18e470a..a504f77a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,7 @@ reduces the memory usage, but should also be slightly faster. * Support for high-res mouse wheel scroll events ([#1738][1738]). * Styled and colored underlines ([#828][828]). +* Support for SGR 21 (double underline). [1707]: https://codeberg.org/dnkl/foot/issues/1707 [1738]: https://codeberg.org/dnkl/foot/issues/1738 diff --git a/csi.c b/csi.c index 04a15973..2d0f3c62 100644 --- a/csi.c +++ b/csi.c @@ -129,7 +129,13 @@ csi_sgr(struct terminal *term) case 8: term->vt.attrs.conceal = true; break; case 9: term->vt.attrs.strikethrough = true; break; - case 21: break; /* double-underline, not implemented */ + case 21: + term->vt.attrs.underline = true; + term->vt.underline.style = UNDERLINE_DOUBLE; + term->bits_affecting_ascii_printer.underline_style = true; + term_update_ascii_printer(term); + break; + case 22: term->vt.attrs.bold = term->vt.attrs.dim = false; break; case 23: term->vt.attrs.italic = false; break; case 24: { diff --git a/doc/foot-ctlseqs.7.scd b/doc/foot-ctlseqs.7.scd index c3a6e163..3ed26b11 100644 --- a/doc/foot-ctlseqs.7.scd +++ b/doc/foot-ctlseqs.7.scd @@ -159,6 +159,8 @@ m*. : Conceal; text is not visible, but is copiable | 9 : Crossed-out/strike +| 21 +: Double underline | 22 : Disable *bold* and *dim* | 23