diff --git a/src/vs/workbench/contrib/search/browser/searchView.ts b/src/vs/workbench/contrib/search/browser/searchView.ts index e8b045a8586a1eed7e8e59938eceecd5fae7b682..f80381fac4058cc33a6e17ace9dbf6b22c96db5f 100644 --- a/src/vs/workbench/contrib/search/browser/searchView.ts +++ b/src/vs/workbench/contrib/search/browser/searchView.ts @@ -1657,7 +1657,7 @@ export class SearchView extends ViewPane { revealIfVisible: true } }, sideBySide ? SIDE_GROUP : ACTIVE_GROUP).then(editor => { - if (editor && element instanceof Match && preserveFocus) { + if (element instanceof Match && preserveFocus && isCodeEditor(editor)) { this.viewModel.searchResult.rangeHighlightDecorations.highlightRange( (editor.getControl()).getModel()!, element.range()