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

Trim the file name in the search menu #54529

Closed
JoshuaKGoldberg opened this issue Jul 18, 2018 · 1 comment · Fixed by #54625
Closed

Trim the file name in the search menu #54529

JoshuaKGoldberg opened this issue Jul 18, 2018 · 1 comment · Fixed by #54625
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug search Search widget and operation issues verified Verification succeeded
Milestone

Comments

@JoshuaKGoldberg
Copy link
Contributor

trim file name search

Suppose you're looking for MyFile.ts or MyFile.ts:1:23. If you search them exactly, you'll get the file result. If you prepend and/or append whitepace, e.g. MyFile.ts, you won't.

It's common to accidentally include spaces when copy & pasting file names from, say, test reports. I'd love to fix this issue if you don't mind!

@vscodebot vscodebot bot added the search Search widget and operation issues label Jul 18, 2018
@roblourens
Copy link
Member

Assuming leading and trailing whitespace is never relevant to any filePattern in a search, I think the correct spot would be here: https://github.com/Microsoft/vscode/blob/9c2084b9ee8c3a7ac0320772bd201cd341d08e5f/src/vs/workbench/parts/search/common/queryBuilder.ts#L83

A PR would be great!

@roblourens roblourens added the bug Issue identified by VS Code Team member as probable bug label Jul 18, 2018
@roblourens roblourens added this to the July 2018 milestone Jul 18, 2018
@mjbvz mjbvz added the verified Verification succeeded label Aug 2, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Sep 2, 2018
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 search Search widget and operation issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants