diff --git a/src/vs/editor/contrib/referenceSearch/referencesController.ts b/src/vs/editor/contrib/referenceSearch/referencesController.ts index 32b8746b7685a87cedfbc993ead916284c3e30f7..6b8e474841b6109acc2f0fda66c772fe63f07c35 100644 --- a/src/vs/editor/contrib/referenceSearch/referencesController.ts +++ b/src/vs/editor/contrib/referenceSearch/referencesController.ts @@ -228,15 +228,15 @@ export abstract class ReferencesController implements editorCommon.IEditorContri } public openReference(ref: Location, sideBySide: boolean): void { + // clear stage + if (!sideBySide) { + this.closeWidget(); + } + const { uri, range } = ref; this._editorService.openCodeEditor({ resource: uri, options: { selection: range } }, this._editor, sideBySide); - - // clear stage - if (!sideBySide) { - this.closeWidget(); - } } }