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

Ripgrep: match not found when using match-case, match-word #24299

Closed
bpasero opened this issue Apr 8, 2017 · 5 comments
Closed

Ripgrep: match not found when using match-case, match-word #24299

bpasero opened this issue Apr 8, 2017 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority search Search widget and operation issues verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Apr 8, 2017

Steps to Reproduce:

  1. search for new FileEditorInput
  2. enable match-case, match-word

=> no results found

Disable ripgrep and find one result.

This seems like a serious regression from before and will probably cause quite some frustration when matches are not found. I very often rely on the fact that search is accurate and I very often use the combination of match-case and match-word even when I use for multiple words.

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority search Search widget and operation issues labels Apr 8, 2017
@roblourens
Copy link
Member

This is from cab5612 (not in 1.11) in which I forgot that #23534 happened.

@roblourens
Copy link
Member

@bpasero Do you know why https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/strings.ts#L209 escapes whitespace and commas? I don't think that's ever necessary. It's a very old line of code. I can remove it.

@bpasero
Copy link
Member Author

bpasero commented Apr 10, 2017

@roblourens I don't, this method seems literally as old as the first lines of code we wrote back in the days (Dec 2011!) :). Maybe @alexandrudima knows

image

@alexdima
Copy link
Member

I think the idea of the method is to create a regular expression from a string (i.e. from the find widget input box).

If the regex toggle is off, special characters need to be escaped. It is possible this is flawed.

@roblourens
Copy link
Member

Right, I'll try to remove , and \s from there (and strings.escapeRegExpCharacters) and look at the places those methods are used and test it a bunch. I think it's safe.

roblourens added a commit that referenced this issue Apr 11, 2017
@roblourens roblourens added this to the April 2017 milestone Apr 20, 2017
@bpasero bpasero added the verified Verification succeeded label Apr 26, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority search Search widget and operation issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants