[PR #18855] Fix two image erasure bugs #31623

Open
opened 2026-01-31 09:48:28 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/18855

State: closed
Merged: Yes


Summary of the Pull Request

This PR fixes two cases where image content wasn't correctly erased when
overwritten.

  1. When legacy console APIs fill an area of the buffer using a starting
    coordinate and a length, the affected area could potentially wrap over
    multiple rows, but we were only erasing the overwritten image content on
    the first affected row.

  2. When copying an area of the buffer with text content over another
    area that contained image content, the image in the target area would
    sometimes not be erased, because we ignored the _eraseCells return
    value which indicated that the image slice needed to be removed.

References and Relevant Issues

The original code was from the Sixel implementation in PR #17421.

Validation Steps Performed

I've manually verified that these two cases are now working as expected.

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/18855 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request This PR fixes two cases where image content wasn't correctly erased when overwritten. 1. When legacy console APIs fill an area of the buffer using a starting coordinate and a length, the affected area could potentially wrap over multiple rows, but we were only erasing the overwritten image content on the first affected row. 2. When copying an area of the buffer with text content over another area that contained image content, the image in the target area would sometimes not be erased, because we ignored the `_eraseCells` return value which indicated that the image slice needed to be removed. ## References and Relevant Issues The original code was from the Sixel implementation in PR #17421. ## Validation Steps Performed I've manually verified that these two cases are now working as expected. ## PR Checklist - [x] Closes #18568
claunia added the pull-request label 2026-01-31 09:48:28 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31623