aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2026-01-28 08:21:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2026-01-28 08:33:16 +0000
commit6fbb9b7d3b2b43e69ca3ce56823fdb9f65a74890 (patch)
treed2dafdc2b60f36cf6c3a606c916178047eeb2541 /render.c
parentinput: ignore release events after a keyboard shortcut was triggered (diff)
sixel: force a height of at least one sixel when explicitly resizing
Applications often prefix the sixel with a raster attributes (RA) sequence, where they tell us how large the sixel is. Strictly speaking, this just tells us the size of the area to clear, but we use it as a hint and pre-allocates the image buffer. It's important to stress that it is valid to emit a MxN RA, and then write sixel data outside of that area. Foot handles this, in _most_ cases. We didn't handle the corner case Mx0. I.e. a width > 0, but height == 0. No image buffer was allocated, and we also failed to detect a resize was necessary when the application started printing sixel data. Much of this is for performance reason; we only check the minimum necessary. For example, we only check if going outside the pre-allocated *column* while printing sixels. *Rows* are checked on a graphical newline. In other words, the *current* row has to be valid when writing sixels. And in case of Mx0, it wasn't. Fix by forcing a height of at least one sixel (typically 6 pixels). Closes #2267
Diffstat (limited to 'render.c')
0 files changed, 0 insertions, 0 deletions