Skip to content

Add support for SGR 2 faint and SGR 9 strikethrough#1380

Open
antonme wants to merge 2 commits intomobile-shell:masterfrom
antonme:upstream-pr-sgr-faint-strikethrough
Open

Add support for SGR 2 faint and SGR 9 strikethrough#1380
antonme wants to merge 2 commits intomobile-shell:masterfrom
antonme:upstream-pr-sgr-faint-strikethrough

Conversation

@antonme
Copy link
Copy Markdown

@antonme antonme commented Mar 28, 2026

This adds support for the ECMA-48 SGR attributes for faint (2) and
strikethrough (9), along with their reset sequences.

In particular:

  • 2 enables faint / decreased intensity
  • 9 enables strikethrough / crossed-out
  • 22 clears both bold and faint
  • 29 clears strikethrough

The implementation is intentionally small and only touches:

  • src/terminal/terminalframebuffer.h
  • src/terminal/terminalframebuffer.cc
  • src/tests/emulation-attributes.test

It wires the already-defined faint attribute into the SGR parser/emitter and
adds strikethrough to the rendition enum so both attributes are parsed and
re-emitted correctly.

Test coverage extends the existing emulation-attributes regression test with
cases for:

  • 2
  • 9
  • 1;22
  • 2;22
  • 9;29

This is a current rebase of the older #1059 change onto current master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant