Skip to content

Comments

Fix some incorrect SGR codes#1

Open
TBBle wants to merge 2 commits intojdebp:masterfrom
TBBle:fix-some-incorrect-SGR-codes
Open

Fix some incorrect SGR codes#1
TBBle wants to merge 2 commits intojdebp:masterfrom
TBBle:fix-some-incorrect-SGR-codes

Conversation

@TBBle
Copy link

@TBBle TBBle commented Jul 14, 2021

I came across this as a suggested test suite for Windows Terminal, and while trying it out, I hit a few issues:

  • The 'Rapid blink' line continued blinking in the no-blink section
  • The SGR 38 and 48 colour parameters incorrectly implemented the ITU T.416-conformant layout.

Windows Terminal doesn't currently implement the latter, but there was a fair bit of research done on microsoft/terminal#4321 as preparation work. Per https://gist.github.com/XVilka/8346728#gistcomment-2774523 there is some ambiguity in the specification, so for the purposes of this repo, it might make sense to make that change toggleable as well?

TBBle added 2 commits July 15, 2021 05:30
The test-script is incorrectly using SGR 26 to cancel SGR 6, but SGR 5
and SGR 6 are _both_ cancelled by SGR 25. SGR 26 is unrelated.

This fixes the issue that the 'no rapid blink' text is blinking in
Windows Terminal, which implements all of SGR 5, 6 and 25; although it
does not differentiate SGR 5 and SGR 6's blink speed.

References:
* https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
* Page 61 of https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf
* https://www.real-world-systems.com/docs/ANSIcode.html

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
Per the standard, the `:` character is the separator for the elements of
the parameter substring. However, the parameter substring itself is
still separated from the SGR value using `;`.

References:
* 13.1.8 of ISO/IEC 8613-6:1994 (E), aka IT-T Rec. T.416 (1993 E)
* https://github.com/csdvrx/sixel-testsuite/blob/master/ansi-vte52.sh

Signed-off-by: Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
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