From d3eb24828e2d977e4f3ac16ff1a332a020028464 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 3 Oct 2019 13:53:30 -0700 Subject: [PATCH] Use strict compare for checking if an editor is active/visible Fixes #81889 Using `.matches` can cause a custom editor to match all custom editors for that resource. Use a strict compare instead. --- src/vs/workbench/api/browser/mainThreadWebview.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadWebview.ts b/src/vs/workbench/api/browser/mainThreadWebview.ts index c5e3d474583..9f2da86e2bf 100644 --- a/src/vs/workbench/api/browser/mainThreadWebview.ts +++ b/src/vs/workbench/api/browser/mainThreadWebview.ts @@ -340,8 +340,8 @@ export class MainThreadWebviews extends Disposable implements MainThreadWebviews const handle = this._webviewEditorInputs.getHandleForInput(editorInput); if (handle) { viewStates[handle] = { - visible: topLevelInput.matches(group.activeEditor), - active: topLevelInput.matches(activeInput), + visible: topLevelInput === group.activeEditor, + active: topLevelInput === activeInput, position: editorGroupToViewColumn(this._editorGroupService, group.id), }; }