render: sixel: regression: wrong cell color behind opaque sixels

An opaque sixel that isn't a multiple of the cell size will have some
cells partially visible (either the entire last row, the entire last
column, or both).

These must be rendered before blitting the sixel.

f5f2f5a954 introduced a regression,
where all such cells were rendered as if the cursor was there, giving
them the wrong appearance.

Closes #1520
This commit is contained in:
Daniel Eklöf 2023-10-13 18:44:44 +02:00
parent 857ac224c5
commit 3dbb86914c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 8 additions and 1 deletions

View file

@ -53,6 +53,13 @@
### Deprecated
### Removed
### Fixed
* Last row and/or column of opaque sixels (not having a size that is a
multiple of the cell size) being the wrong color ([#1520][1520]).
[1520]: https://codeberg.org/dnkl/foot/issues/1520
### Security
### Contributors

View file

@ -1309,7 +1309,7 @@ render_sixel(struct terminal *term, pixman_image_t *pix,
if ((last_row_needs_erase && last_row) ||
(last_col_needs_erase && last_col))
{
render_cell(term, pix, damage, row, term_row_no, col, cursor_col);
render_cell(term, pix, damage, row, term_row_no, col, cursor_col == col);
} else {
cell->attrs.clean = 1;
cell->attrs.confined = 1;