From a3016a6cc909d9c383359a4eaafd30bcd52bd272 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 30 Nov 2021 19:36:28 +0100 Subject: osc-4: don’t update the color of cells with RGB fg/bg colors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OSC 4/104 changes the 256-color palette. We also run a pass over the visible cells, and update their colors. This was previously done by comparing the actual color of the cell, with the “old” color in the palette. If they matched, the cell was updated. This meant that cells with an RGB color (i.e. not a palette based color) was also updated, _if_ its color matched the palette color. Now that each cell tracks its color *source*, we can ignore all non-palette based cells. Note that this still isn’t perfect: if the palette contains multiple entries with the same color, we’ll end up updating the “wrong” cells. Closes #678 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'CHANGELOG.md') diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a725822..026e745c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,8 @@ * Visual corruption with large CSD borders (https://codeberg.org/dnkl/foot/issues/823). * Mouse cursor shape sometimes not being updated correctly. +* Color palette changes (via OSC 4/104) no longer affect RGB colors + (https://codeberg.org/dnkl/foot/issues/678). ### Security -- cgit v1.3