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

Make Explorer Find widget work in 1.94 as long as proposed APIs are enabled (fix #1443) #1444

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

gjsjohnmurray
Copy link
Contributor

This PR fixes #1443 which occurs on VS Code 1.94+

A separate issue is that the Explorer Find widget now depends on FileSearchProvider. I will raise this with the VS Code project.

@gjsjohnmurray
Copy link
Contributor Author

Explorer Find remains broken for folders that use queryparams. This is almost certainly the same as #1427.

@gjsjohnmurray
Copy link
Contributor Author

1.94's new dependency on FileSearchProvider has been raised at microsoft/vscode#230483

filter = `Name LIKE '%${pattern.replace(/(_|%|\\)/g, "\\$1")}%' ESCAPE '\\'`;
} else {
filter = `Name LIKE '%${pattern}%'`;
pattern = pattern.replace(/(_|%|\\)/g, "\\$1");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not always do this replacement and provide the ESCAPE clause? I doubt it impacts performance significantly and it makes this code shorter:

filter = `Name LIKE '%${pattern.replace(/(_|%|\\)/g, "\\$1").replace(/\*/g, "%").replace(/\?/g, "_")}%' ESCAPE '\\'`

@isc-bsaviano
Copy link
Contributor

This looks good, assuming there are no globstars outside the possible leading one.

@gjsjohnmurray gjsjohnmurray merged commit e2b75ab into intersystems-community:master Oct 4, 2024
5 checks passed
@gjsjohnmurray gjsjohnmurray deleted the fix-1443 branch October 4, 2024 12:31
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.

Since VS Code 1.94 the Explorer tree search no longer works for an ISFS folder
2 participants