vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Regression in Search: Literal Search Misses Matches That Regex Finds

Open niontchev-endurosat opened this issue 3 weeks ago • 1 comments

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:

  1. 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
  2. Search for HAVE_VERBOSE_MESSAGES with regex disabled.
  3. Enable regex and search again.
  4. 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:

  1. 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 */
  2. 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)

niontchev-endurosat avatar Dec 03 '25 12:12 niontchev-endurosat

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!