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

Fix forward word/vimword behaviors in caret mode #4312

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

Conversation

twio142
Copy link

@twio142 twio142 commented Sep 24, 2023

No description provided.

@philc
Copy link
Owner

philc commented Sep 26, 2023

Hey @twio142, I tried this PR and it does fix the issue where "w" does not move forward a word in caret mode. I haven't looked at the code in mode_visual.js -- it's in need of cleanup. From what I can tell from your diff, it looks like "move forward" was simply never implemented? Why does move backward work without the need to branch on alterMethod=="move"?

@twio142
Copy link
Author

twio142 commented Sep 26, 2023

@philc

Why does move backward work without the need to branch on alterMethod=="move"?

That's because for forward moving was this character-by-character strategy implemented.

While for backward moving it's just using this universal method: this.selection.modify(this.alterMethod, direction, granularity);

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