Repository navigation
terminal: mark the previous row dirty when clearing its spacer head - #14054
Merged
Merged
Conversation
Erasing a wrapped wide character at the start of a row (ECH or DCH) also clears the spacer head it left at the end of the previous row, but that row was never marked dirty. With both rows visible, an incremental render kept the stale spacer head on screen until something unrelated redrew that row. The clearing happens in the row-start branch of splitCellBoundary. clearCells doesn't do dirty tracking, and both callers only mark the cursor row, so mark the previous row at the point it's mutated. The added dirty assertions fail without the fix.
Contributor
|
Spacer heads don’t participate or affect rendering so they don’t need to participate in dirty tracking. Or am I wrong |
Contributor
Author
|
Spacer heads carry style, right? Standing at the end of line, print (with a background color) a wide character so it wraps -> the last column (carrying the spacer head) is rendered with the background color. And if the wrapped wide char is erased that clears the last column to the erase background, meaning that the previous row needs re-rendering. |
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Erasing a wrapped wide character at the start of a row (
ECHorDCH) also clears the spacer head it left at the end of the previous row, but that row was never marked dirty. With both rows visible, an incremental render kept the stale spacer head on screen until something unrelated redrew that row.The clearing happens in the row-start branch of
splitCellBoundary.clearCellsdoesn't do dirty tracking, and both callers only mark the cursor row, so mark the previous row at the point it's mutated.The added dirty assertions fail without the fix.
AI Disclaimer
Claude did the heavy lifting - identifying the root cause, generating code and description. I reviewed and iterated on it to move around and tweak tests, comments and reduce verboseness. Verified the end user visible behaviour improvement with a script that coloured the wide character, which made the stale rendering visible until a switch to the alt screen and back cleared it it.