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

cw, dw, vw doesn't work with non-ascii char earlier in line #3680

Closed
Tobbe opened this issue Apr 15, 2019 · 2 comments
Closed

cw, dw, vw doesn't work with non-ascii char earlier in line #3680

Tobbe opened this issue Apr 15, 2019 · 2 comments
Labels

Comments

@Tobbe
Copy link

Tobbe commented Apr 15, 2019

Describe the bug
cw, dw, vw etc changes/deletes/selects more than the expected word when there's a "special" character earlier on the line

To Reproduce
Paste the following line in a new file

expect(foo('£')).to.equal('p');
                           ^

In normal mode, place the cursor on p (as indicated by ^ above)

type dw

The line is now

expect(foo('£')).to.equal('
                          ^

Expected behavior

The line should be

expect(foo('£')).to.equal('');
                           ^

Screenshots

vscode_dw_bug

First, with £ earlier on the line dw deletes to the end of the line (this is the bug)
Chainging £ to g dw only deletes the p, as expected

Environment (please complete the following information):

  • Issue Type: Bug
  • Extension Name: vim
  • Extension Version: 1.4.0
  • OS Version: Windows_NT x64 10.0.17134
  • VSCode version: 1.33.1
@ajalab
Copy link
Contributor

ajalab commented Apr 16, 2019

The cause of this issue is due to mishandling of Latin-1 symbols (e.g., '£' and '©'). It seems that characters after a Latin-1 symbol are wrongly regarded as a single word.

I rewrote the word separation part in the recent PR (#3667) a week ago, and it happened to fix the problem you mentioned. However, I found that there is another problem in terms of Latin-1 symbols so that I made additional changes to the PR.

Thanks for reporting the issue!

@jpoon
Copy link
Member

jpoon commented Apr 17, 2019

Resolved with #3667 thanks to @ajalab

@jpoon jpoon closed this as completed Apr 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants