font/shaper: explicitly skip invisible cells while shaping

Fixes a bug caused by the renderer logic assuming this behavior and not
advancing the run iterator when skipping foreground elements in cells
with the invisible flag set.
This commit is contained in:
Qwerasd
2024-10-11 13:44:49 -04:00
parent 97abf3c370
commit e4f4b708c9

View File

@ -55,6 +55,14 @@ pub const RunIterator = struct {
break :max 0;
};
// Invisible cells don't have any glyphs rendered,
// so we explicitly skip them in the shaping process.
while (self.i < max and
self.row.style(&cells[self.i]).flags.invisible)
{
self.i += 1;
}
// We're over at the max
if (self.i >= max) return null;