CodinGame / monaco-vscode-api

VSCode public API plugged on the monaco editor
MIT License
250 stars 33 forks source link

Searching special RegEx characters does not return result with RegEx enabled #462

Closed bosunski closed 4 months ago

bosunski commented 4 months ago

When special RegEx characters (likes of \ + * ? [ ^ ] $ ( ) { } = ! < > | : -) are entered in the search input and RegEx mode is enabled, the search keeps loading without return. These can be reproduced in the Online Demo too.

Screenshot 2024-07-11 at 17 47 05

Meanwhile, on Local VSCode or VSCode.dev, you will get an error, which is expected.

Screenshot 2024-07-11 at 17 46 45
CGNonofr commented 4 months ago

That's because the search in VSCode can only operate:

In the demo, we use a virtual client filesystem and there is no built-in way to search in it, so the demo implements a basic search that is probably not handling edge cases very well

If you enable the html filesystem provider and open a local directory, do you confirm the searching works well?

bosunski commented 4 months ago

The same issue happens when using HTML filesystem. I also think this doesn't have something to do with the filesystem provider because, when this happens, the provideTextSearchResults exposed by the provider is not even called. So, I think this might be something else.

bosunski commented 4 months ago

Opening the search in the editor, did reveal an error that would have been seen in the UI (as in the image in the issue description). This also seems to be before the provider is called.

Screenshot 2024-07-11 at 21 35 46
CGNonofr commented 4 months ago

Ok It looks like you're right! I've found the issue, fix is coming soon, thanks for the report!

github-actions[bot] commented 4 months ago

:tada: This issue has been resolved in version 7.0.4 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: