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

WIP: Handling jk motion for cjk and full width characters #9471

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

smokyabdulrahman
Copy link

@smokyabdulrahman smokyabdulrahman commented Feb 1, 2025

What this PR does / why we need it:
To handle full width character correctly (as VSCode does and neovim/vim) on jk motions
Which issue(s) this PR fixes
This is to address issue: #4096

Special notes for your reviewer:
The code is WIP (needs cleaning after making sure things work), the changes broke the logic of desiredColumn property.
I am trying to understand why we need it (since VSCode already handles this properly), and how to fix it.

If anybody want to contribute to the PR, please do so, or at least share your ideas ❤️.

helpful files from VSCode repo:
https://github.com/microsoft/vscode/blob/f253ed1e6c2868ba648681a3a7942603c2ba836b/src/vs/editor/common/cursor/cursorMoveOperations.ts#L157
https://github.com/microsoft/vscode/blob/main/src/vs/editor/common/core/cursorColumns.ts#L25
https://github.com/microsoft/vscode/blob/main/src/vs/base/common/strings.ts#L687

This is to address issue: VSCodeVim#4096

However, my code broke `desiredColumn` logic.
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.

1 participant