fix(compositor): don't blend uninitialized background cells #34364

Problem:  A 'winblend' window floating over uninitialized cells loses
          its highlighting.

Solution: Return the front attribute for uninitialized background cells.
This commit is contained in:
luukvbaal
2025-06-09 14:43:33 +02:00
committed by GitHub
parent 811e12cebc
commit 6f632a8615
2 changed files with 25 additions and 1 deletions

View File

@@ -699,8 +699,9 @@ static HlAttrs get_colors_force(int attr)
/// @return the resulting attributes.
int hl_blend_attrs(int back_attr, int front_attr, bool *through)
{
// Cannot blend uninitialized cells, use front_attr for uninitialized background cells.
if (front_attr < 0 || back_attr < 0) {
return -1;
return front_attr;
}
HlAttrs fattrs = get_colors_force(front_attr);