-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
area/addon/searchgood first issuehelp wantedtype/bugSomething is misbehavingSomething is misbehaving
Milestone
Description
Currently, the @xtermjs/addon-search plugin applies the case-sensitive flag to the full regex, which means that if it's false, meta-characters like \S, which is non-whitespace chars, will be interpreted as lowercase (in this case, \s is whitespace chars). Monaco uses a different method, where only non-meta chars are interpreted as case-sensitive when the regex flag is set. While it's kind of silly to treat a regex as case-insensitive, it makes sense for xtermjs and monaco to align on their implementation.
Details
- Browser and browser version: Electron 33.2.1
- OS version: macOS Sequoia 15.2
- xterm.js version: 5.5.0
Steps to reproduce
- run
echo "path wrath hath"in the VSCode terminal - activate the terminal search, set case-sensitive and whole-word to false, and set regex to true
- type
\S+thin the search bar - observe that nothing is highlighted
- Open a new tab in VSCode and type
path wrath hathinto it as its only contents - activate the Monaco search, set case-sensitive and whole-word to false, and set regex to true
- type
\S+thin the search bar - observe that each word is being highlighted separately
Metadata
Metadata
Assignees
Labels
area/addon/searchgood first issuehelp wantedtype/bugSomething is misbehavingSomething is misbehaving