Skip to content

Fix DECCRA when copying from a double-width line#15026

Merged
zadjii-msft merged 2 commits intomicrosoft:mainfrom
j4james:fix-deccra-dwl
Mar 22, 2023
Merged

Fix DECCRA when copying from a double-width line#15026
zadjii-msft merged 2 commits intomicrosoft:mainfrom
j4james:fix-deccra-dwl

Conversation

@j4james
Copy link
Collaborator

@j4james j4james commented Mar 21, 2023

When a DECCRA operation is copying content that spans a double width
line, it's possible that some range of the bounding rectangle will be
off-screen, and that range is not supposed to be copied. However, the
code checking for off-screen positions was using incorrect coordinates,
so we would mistakenly copy content that shouldn't be copied, and drop
content that should have been copied. This PR fixes that.

References and Relevant Issues

This was a regression introduced in PR #14650 when fixing an issue with
horizontal scrolling of DBCS characters.

Validation Steps Performed

I manually verified this fixes the test case in #15019, and I've also
added a unit test that replicates that case.

Closes #15019

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-VT Virtual Terminal sequence support Product-Conhost For issues in the Console codebase labels Mar 21, 2023
@j4james j4james marked this pull request as ready for review March 21, 2023 12:02
@zadjii-msft zadjii-msft merged commit 7a2e4f8 into microsoft:main Mar 22, 2023
@j4james j4james deleted the fix-deccra-dwl branch March 28, 2023 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect DECCRA behavior when copying from a double-width line

4 participants