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

Utilize LengthInBufferCells when creating Completions Menu #1214

Merged
merged 2 commits into from
Dec 6, 2019

Conversation

msftrncs
Copy link
Collaborator

The stage of analysis of the width of each completion item to determine the width of the columns of items in the completion menu did not account for buffer cells as consumed by CJK characters.

This corrects that.

This also removes ShortenLongCompletions, as it appears to be discontinued code, and also would not support CJK characters in completion items without modifications.

This fixes #1213, and maybe others.

Use LengthInBufferCells() for determining the display width of menu items
in CreateCompletionMenu() to correct support of CJK characters in
completion items.

Fixes PowerShell#1213.
Remove ShortenLongCompletions() as it appears to be unused and would
not correctly support CJK characters in completion items.
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.

LGTM

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

Successfully merging this pull request may close these issues.

The entry is incomplete
2 participants