-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Description
- VSCode Version: Code 1.18.0 (dcee220, 2017-11-08T12:44:48.751Z)
- OS Version: Linux x64 4.4.0-98-generic
- Extensions:
| Extension | Author (truncated) | Version |
|---|---|---|
| sort-lines | Tyr | 1.3.0 |
| code-gnu-global | aus | 0.2.2 |
| CppSnippets | har | 0.0.13 |
| cmake-tools-helper | mad | 0.1.1 |
| cpptools | ms- | 0.14.2 |
| cmake-tools | vec | 0.10.3 |
| clang-format | xav | 1.6.1 |
I'm editing C++, C#, Javascript, Java, although this appears reproducible regardless of language.
I have ctrl+f bound to actions.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 to editor.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:
- Select text that contains regex meta-characters:
.*+{}[] - Press
ctrl+for go to Edit->Find to open the Find window. If Use Regular Expression (Alt+R) is not already selected, pressalt+rand (with the text still selected), pressctrl+fagain so text in the Find window updates. - Text in the Find window should be escaped.
This is correct behavior.
- Select text that contains regex meta-characters:
.*+{}[] - Press
ctrl+f3to open the Find window with that text selected. - Toggle Use Regular Expression (Alt+R), then press
ctrl+f3again so text in the Find window updates. - Text in the Find window is not escaped.
I would expect the text to be escaped, like it is with actions.find.
Reproduces without extensions: Yes