Open
Conversation
- plumb TEXTEDITING{,_EXT} events (text being composed, not committed)
- delete selected text when composition starts
- store text being composed
- render being-composed text after the cursor with an underline
- draw cursor after being-composed text so candidate selection UI
appears in the correct place
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #417
—
I finally got curious and spent a little time debugging. I found several problems, about half of which are in this patch.
The other half of the problems are in SDL, so this patch is NOT a complete fix. But after appropriate review, I'll see if I can send a patch to that project as well.
Please note that out of CJK, I can only do some K. I don't really do C or J, and I gather from the API that the C/J IMEs have some behaviors that have no analogues in K. So to the extent that C/J act differently from K, I have not tested those aspects. For example, C/J apparently allow editing of the middle of being composed text, whereas K is simpler and allows only appending keystrokes to or deleting them from the end. AI implemented support for displaying being-composed-text-while-editing-the-middle, but I have not tested it.
It's a little more code than I wish it were, but I think there should be no risk of regression in the non-CJK case.
Let me know what you think. If you have comments, I'll try to address them.