-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: avoid escaping the exact word search twice #8566
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please write a test that fails before this change and passes after?
Added tests |
Thanks! But these tests seem to succeed before your change as well - mind adding one that tests the change? You can adjust the config for a test by passing |
I was debating how to do this so. The problem with the "config" parameter is that it doesn't allow me to change the non-vim-specific-extension configuration of VSCode. Here, what I need is to modify the global VScide config |
Ah, right, I should really add a way to do that easily. For now just put |
Apparently, on exact word search, the word is getting regexp-escaped twice - once in
Vim/src/actions/commands/search.ts
Lines 39 to 41 in ee4888a
Vim/src/actions/commands/search.ts
Lines 102 to 103 in ee4888a
The impact for the user happens when the user configures for VSCode "what is a word". For example, my VSCode configuration on the R language is:
It's hard to notice, but the difference is that
.
isn't appear there, but appear in the following. The default value for this option is:I do like that VSCodeVim treat my word correctly according to VSCode prefs, but I think that VSCodeVim should treat this word correctly on search (probably it was just a mistake in the code).