Skip to content

Fix Korean IME to display a character being composed in conhost#8632

Merged
1 commit merged intomicrosoft:mainfrom
MycroftKang:fix-korean-ime
Jan 4, 2021
Merged

Fix Korean IME to display a character being composed in conhost#8632
1 commit merged intomicrosoft:mainfrom
MycroftKang:fix-korean-ime

Conversation

@MycroftKang
Copy link
Copy Markdown
Contributor

@MycroftKang MycroftKang commented Dec 21, 2020

Summary of the Pull Request

This PR fixes Korean IME to display a character being composed in conhost.

Before

before

After

after

PR Checklist

  • Closes Korean IME suggestions don't appear #6227
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Validation Steps Performed

@ghost ghost added Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Conhost For issues in the Console codebase labels Dec 21, 2020
@MycroftKang
Copy link
Copy Markdown
Contributor Author

MycroftKang commented Dec 21, 2020

I manually tested on Korean, Japanese, and Chinese IME, and found that only when using Korean IME, the CEditSessionUpdateCompositionString::_MakeInterimString function is called. (so far as I have checked)

Meanwhile, in Korean, the maximum number of interim character is 1, so the values of lStartResult and lEndResult are always 0.
So I changed code to not throw an exception when lEndResult value is 0.

However, I don't know the background of this code being written this way, so I'm not sure if my changes won't cause problems when typing in Japanese and Chinese.

@miniksa @leonMSFT Could you help me with this?

@miniksa
Copy link
Copy Markdown
Member

miniksa commented Dec 21, 2020

@MycroftKang, thank you for taking a look at this. I really appreciate it. I'm out of the office, though, until January 4th. My plan is to dig through the code history then and make sure that this shouldn't cause a problem. Thank you in advance for your patience!

@miniksa miniksa self-assigned this Dec 21, 2020
@zadjii-msft zadjii-msft self-assigned this Jan 4, 2021
@zadjii-msft
Copy link
Copy Markdown
Member

@msftbot make sure @miniksa signs off on this

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 4, 2021
@ghost
Copy link
Copy Markdown

ghost commented Jan 4, 2021

Hello @zadjii-msft!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I'll only merge this pull request if it's approved by @miniksa

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

Copy link
Copy Markdown
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.

This seems reasonable to me, assuming that miniksa's investigation doesn't find anything alarming

@zadjii-msft zadjii-msft removed their assignment Jan 4, 2021
@miniksa
Copy link
Copy Markdown
Member

miniksa commented Jan 4, 2021

OK. I did the history search. It looks like it was always rejecting anything that wasn't 1 for this particular check back through the v1 conhost. However, the v1 conhost also had a bit of divergence for Chinese, Japanese, and Korean right up at the top that went down 4 different mechanisms that I had unified way back in something like 2015 because they were 95% the same. It could be that I made this mistake in the unification of the interfaces but that code is a bit harder to analyze.

However, on looking at how it's used and operates, I'm fine with it just switching to not throwing the error since it appears to resolve Korean and doesn't appear to immediately impact Chinese or Japanese. If something comes up as fall out later, I think we can further work it out at that time.

@miniksa miniksa removed the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 4, 2021
@miniksa
Copy link
Copy Markdown
Member

miniksa commented Jan 4, 2021

Automerge off. @DHowett is going to check this against UNIVERSAL WUBI before commit.

@ghost ghost merged commit 08646e5 into microsoft:main Jan 4, 2021
@miniksa
Copy link
Copy Markdown
Member

miniksa commented Jan 4, 2021

Woops. He'll check it after the fact.

@DHowett
Copy link
Copy Markdown
Member

DHowett commented Jan 4, 2021

Validated. Thanks again for the fix.

mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
…osoft#8632)

## Summary of the Pull Request
This PR fixes Korean IME to display a character being composed in conhost.

### Before
![before](https://user-images.githubusercontent.com/58393346/102745310-03f23c80-439f-11eb-9f86-263da2dbddbb.gif)

### After
![after](https://user-images.githubusercontent.com/58393346/102745343-14a2b280-439f-11eb-853c-42b52bf442f4.gif)

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Closes microsoft#6227
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
@MycroftKang
Copy link
Copy Markdown
Contributor Author

@miniksa @DHowett Can you tell me when this PR with the bug fix related to Korean IME will be officially released? I'm currently using Windows 10 21H1, but found this bug still exists... 😕

@zadjii-msft
Copy link
Copy Markdown
Member

This turned into OS PR !5568527, which made it to co_release in February, so I believe this only made it to Windows 11 builds. Looks like 10.0.21313 or above, but I think that just means "Windows 11"

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Korean IME suggestions don't appear

4 participants