Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct cursor positioning issues #1221

Merged
merged 1 commit into from
Dec 6, 2019
Merged

Conversation

msftrncs
Copy link
Collaborator

@msftrncs msftrncs commented Dec 3, 2019

Correct cursor positioning in cases where newline appears 1 character before last column, or a CJK character ends the line but wraps to next display line, and in cases where continuation prompt contains either CJK characters, or VT color sequences.

Fixes #1216.
Fixes #1217.
Fixes #1188.

This does simplify some X calculations, that I didn't have to touch, but they were more complicated than they needed to be.

Correct cursor positioning in cases where newline appears 1 character before
last column, or a CJK character ends the line but wraps to next display
line, and in cases where continuation prompt contains either CJK characters,
or VT color sequences.

Fixes PowerShell#1216.
Fixes PowerShell#1217.
Fixes PowerShell#1188.
@msftrncs
Copy link
Collaborator Author

msftrncs commented Dec 5, 2019

I am thinking I should be able to generate some tests for these conditions (at least 1216 and 1217), but I am not sure where they should be placed? Does the test console correctly support double-width characters?

@lzybkr
Copy link
Member

lzybkr commented Dec 5, 2019

I don't think the test framework knows anything about double width characters.

Copy link
Member

@daxian-dbw daxian-dbw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msftrncs Thanks for the fix! I have verified #1216, #1217, and #1188 have been resolved by your fix.

@daxian-dbw daxian-dbw merged commit 1c41239 into PowerShell:master Dec 6, 2019
@msftrncs msftrncs deleted the FixFor1216 branch December 7, 2019 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants