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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #341 CJK Problem. #446

Merged
merged 1 commit into from
Jul 14, 2016
Merged

Fix #341 CJK Problem. #446

merged 1 commit into from
Jul 14, 2016

Conversation

rebornix
Copy link
Member

Yay! We love PRs! 馃帄

Please include a description of your change & check your PR against this list, thanks:

  • Commit message has a short title & issue references
  • Commits are squashed
  • It builds and tests pass (e.g gulp tslint)

Two impoartant things to note here:

  1. We are handing type events asynchronously, in which case, default:replacePreviousChar might be executed before our customized type event. When we type in CJK characters, we are typing English characters firstly then replace them with the desired CJK character/s. If the replacePreviousChar happens before its corresponding type event, we are running into chaos.
  2. We are maintaining cursorPosition in vimState and we will leverage this state to implement dot repeat somehow. However, when we perform type then replacePreviousChar, it will ruin our cursorPosition maintaining. So we should always update the cusor info after triggering default:replacePreviousChar.

After this fix, the CJK typing experience in Insert Mode is likely perfect (I'm not 100% sure whether there would be other issues as I just write Chinese). CJK handling in Normal Mode is still blocked by VS Code right now but the priority is really low, why would you bother tying CJK while using Vim commands?

@johnfn johnfn merged commit 36af724 into VSCodeVim:master Jul 14, 2016
@johnfn
Copy link
Member

johnfn commented Jul 14, 2016

Nice!

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.

None yet

2 participants