diff --git a/src/vs/workbench/parts/search/browser/searchView.ts b/src/vs/workbench/parts/search/browser/searchView.ts index 98768f619cdbe..49f0b837750c8 100644 --- a/src/vs/workbench/parts/search/browser/searchView.ts +++ b/src/vs/workbench/parts/search/browser/searchView.ts @@ -732,8 +732,12 @@ export class SearchView extends Viewlet implements IViewlet, IPanel { let updatedText = false; const seedSearchStringFromSelection = this.configurationService.getValue('editor').find.seedSearchStringFromSelection; if (seedSearchStringFromSelection) { - const selectedText = this.getSearchTextFromEditor(); + let selectedText = this.getSearchTextFromEditor(); if (selectedText) { + if (this.searchWidget.searchInput.getRegex()) { + selectedText = strings.escapeRegExpCharacters(selectedText); + } + this.searchWidget.searchInput.setValue(selectedText); updatedText = true; }