vscode
vscode copied to clipboard
Regression in Search: Literal Search Misses Matches That Regex Finds
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.106.3
- OS Version: Windows 11 Enterprise/26100.7171
Steps to Reproduce:
- Open a C/C++ project with these lines: //#define HAVE_VERBOSE_MESSAGES /* Recommended during development prints errors and warnings */#if defined(HAVE_VERBOSE_MESSAGES)Show more lines
- Search for HAVE_VERBOSE_MESSAGES with regex disabled.
- Enable regex and search again.
- Compare results.
Comments: The new search implementation in VS Code appears to have a regression. When searching for a simple string like HAVE_VERBOSE_MESSAGES when Regular Expression enabled/disabled:
- Regex disabled (literal search): Finds only one match in the header where it is defined: /#define HAVE_VERBOSE_MESSAGES /* Recommended during development prints errors and warnings */
- Regex enabled: Finds two matches (both correct) in the definition header and in another file: -- first match /#define HAVE_VERBOSE_MESSAGES /* Recommended during development prints errors and warnings */ -- SECOND MATCH #if defined(HAVE_VERBOSE_MESSAGES)
Thanks for creating this issue! It looks like you may be using an old version of VS Code; the latest stable release is 1.106.3. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!