[PR #17568] Fix colors getting lost on reflow #31271

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

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

State: closed
Merged: Yes


The "copy the remaining attributes" loop assumes that it has full
ownership over the rows that it copies. For that to be true,
we have to of course make sure that the current write-cursor
is at a fresh, new row in the first place.

Validation Steps Performed

  • In a new pwsh tab with 120 colums:
    Write-Host -NoNewline "`e[36m$('a'*120)`e[m"; sleep 10
  • Resize the window wider
  • Color doesn't get lost
**Original Pull Request:** https://github.com/microsoft/terminal/pull/17568 **State:** closed **Merged:** Yes --- The "copy the remaining attributes" loop assumes that it has full ownership over the rows that it copies. For that to be true, we have to of course make sure that the current write-cursor is at a fresh, new row in the first place. ## Validation Steps Performed * In a new pwsh tab with 120 colums: ``Write-Host -NoNewline "`e[36m$('a'*120)`e[m"; sleep 10`` * Resize the window wider * Color doesn't get lost
claunia added the pull-request label 2026-01-31 09:46:12 +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#31271