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

Allow Emoji composition to be seen in the TSF TextBlock #4836

Merged
1 commit merged into from
Mar 9, 2020

Conversation

leonMSFT
Copy link
Contributor

@leonMSFT leonMSFT commented Mar 7, 2020

Summary of the Pull Request

Emoji composition was only being shown one letter at a time. This is because of the way I expected CoreTextTextUpdatingEventArgs.Range to be provided to TSFInputControl during composition (for Chinese/Japanese IME). Emoji IME composition gives the StartCaretPosition as the same as EndCaretPosition, unlike how for Chinese/Japanese IME, StartCaretPosition is usually the start of the composition and EndCaretPosition is the latest character in the composition. The solution is to change the _inputBuffer.substr() call to simply grab all of the buffer starting from _activeTextStart. This way I can ensure that I grab all of the "active text", instead of trusting the given args.Range to tell me the active text.

PR Checklist

Validation Steps Performed

Chinese, Japanese, Korean, Emoji composition performed. Emoji selection through pointer also performed.

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

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

Just to be sure- now all of C, J, K and Emoji work properly? 😄

Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

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

Oops, wrong account.

@leonMSFT
Copy link
Contributor Author

leonMSFT commented Mar 9, 2020

I tested all four out again, all of them seem to work as expected 🤞

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

sure ¯\_(ツ)_/¯

@zadjii-msft
Copy link
Member

@leonMSFT does my boy "¯\_(ツ)_/¯" still work with the emoji picker too?

@zadjii-msft zadjii-msft added the Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) label Mar 9, 2020
@leonMSFT
Copy link
Contributor Author

leonMSFT commented Mar 9, 2020

ya boi ¯_( ͡° ͜ʖ ͡°)_/¯ is safe and sound
shrugmaybe

@leonMSFT
Copy link
Contributor Author

leonMSFT commented Mar 9, 2020

oh no the arm got chopped off

@leonMSFT leonMSFT added the AutoMerge Marked for automatic merge by the bot when requirements are met label Mar 9, 2020
@ghost
Copy link

ghost commented Mar 9, 2020

Hello @leonMSFT!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit a34a957 into master Mar 9, 2020
@ghost ghost deleted the dev/lelian/emojicomposition branch March 9, 2020 15:29
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) AutoMerge Marked for automatic merge by the bot when requirements are met
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emoji IME now only shows one letter at a time, overstrikes
4 participants