From 9f321e60303d76c40eeff1bea931fbbead6434ff Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 12 Dec 2020 20:50:43 +0100 Subject: csi: fix sub-parameter versions of 38/48 SGR escapes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Well this is embarrassing; the sub-parameter versions of the 38/48 SGR escapes all required an extra ‘:2’ that wasn’t supposed to be there, causing all the other sub-parameters to be shifted one step to the right. That is, foot expected e.g. 38:2:2:r:g:b, or 38:2:5:idx when the correct sequences are 38:2:cs:r:g:b and 38:5:idx. I.e. I mixed up the color-space ID (cs) of 38:2 with *type* of color: RGB or indexed. In addition to fixing this, this patch also adds support for a “bastard” version of the sub-parameter based RGB escapes, where the color-space identifier has been left out: e.g. 38:2:r:g:b. This sequence is invalid, but applications tend to “forget” the color-space ID... --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index caf1a73d..c11a5189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -107,6 +107,10 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See has been used to enable blinking. **cursor.blink** in `foot.ini` controls the default state of `CSI Ps SP q` (https://codeberg.org/dnkl/foot/issues/218). +* The sub-parameter versions of the SGR RGB color escapes (e.g + `\E[38:2...m`) can now be used _without_ the color space ID + parameter. + ### Deprecated ### Removed @@ -125,6 +129,8 @@ means foot can be PGO:d in e.g. sandboxed build scripts. See attributes and charset configuration, just like `\E7`+`\E8`. * Report mouse motion events to the client application also while dragging the cursor outside the grid. +* Parsing of the sub-parameter versions of indexed SGR color escapes + (e.g. `\E[38:5...m`) ### Security -- cgit v1.3