Find Next Selection, regex enabled: preserve escaping #38232
Labels
bug
Issue identified by VS Code Team member as probable bug
editor-find
Editor find operations
verified
Verification succeeded
Milestone
I'm editing C++, C#, Javascript, Java, although this appears reproducible regardless of language.
I have
ctrl+f
bound toactions.find
. Regex is enabled, and if I select text containing any regex meta-characters, those are properly escaped in the Find window:{ "key": "ctrl+f", "command": "actions.find" }
becomes\{ "key": "ctrl\+f", "command": "actions\.find" \}
I have
ctrl+f3
bound toeditor.action.nextSelectionMatchFindAction
. Regex is (still) enabled, and if I select text containing regex meta-characters, those are NOT properly escaped in the Find window:{ "key": "ctrl+f", "command": "actions.find" }
remains{ "key": "ctrl+f", "command": "actions.find" }
which is then an invalid regex pattern.Steps to Reproduce:
.*+{}[]
ctrl+f
or go to Edit->Find to open the Find window. If Use Regular Expression (Alt+R) is not already selected, pressalt+r
and (with the text still selected), pressctrl+f
again so text in the Find window updates.This is correct behavior.
.*+{}[]
ctrl+f3
to open the Find window with that text selected.ctrl+f3
again so text in the Find window updates.I would expect the text to be escaped, like it is with
actions.find
.Reproduces without extensions: Yes
The text was updated successfully, but these errors were encountered: