Find+Replace within selection doesn't work
Open
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Does this issue occur when all extensions are disabled?: Yes/No
Yes
- VS Code Version: 1.136.1
- OS Version: MacOS Tahoe 26.6.2
Steps to Reproduce:
1. Select a few lines of code that contain a certain character, such as hyphen (-)
2. Press Cmd+Option+F to open the Find+Replace box
3. Enter a hyphen (-) in the find box
4. Enter anything in the Replace box
5. Next to the Find box is the number of occurrences. I see the number of hyphens in my entire file instead of only in my selected lines
6. Clicking the "Replace" icon works, but if I clicked the "Replace All" icon, all the occurrences outside my selected lines would be affected, hence the bug
Contributor guide
Assessment
This issue has not been assessed yet.