Repository navigation
Conversation
When the row before a forced wrap has no content, the moves around the erase were written as `CSI 0 C` and `CSI 0 D`. A count of 0 means 1, so the erase started one cell late and left the first dash on screen. Now the moves are left out when there's nothing to move past. Fixes xtermjs#6231
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.
Fixes #6231
When
_rowEndforces a wrap after a row that ends in empty cells, it goes back up and erases the dashes it printed into them:with
<content>ascurrentLine.length - this._nullCellCount. When the whole row is empty, that is 0, andCSI 0 Cmeans a move of 1. The erase then started one cell late and left the first dash on screen.The fix skips the two moves when there's no content to move past. Rows with content keep the same output.
For the repro in the issue,
\x1b[A\x1b[0C\x1b[10X\x1b[0D\x1b[Bbecomes\x1b[A\x1b[10X\x1b[B, and the replay's first row is empty, as in the source.The other computed moves in the serializer already skip a count of 0, so this was the only place that wrote one.
Testing:
handle empty row followed by wrapped row, usingtestNormalScreenEqual. It fails on master and passes with the fix.addon-serializeintegration suite on Chromium: 41 passed. I didn't run Firefox or WebKit locally.npm run test-unit: 2403 passing.npm run lint-changesis clean.This is independent of the fix for #6230 in the same function. The two branches merge cleanly in either order.