From f16ff38c40c5505347302fd289b9a735c5bba3f9 Mon Sep 17 00:00:00 2001 From: aamunger Date: Wed, 25 Jan 2023 11:03:39 -0800 Subject: [PATCH] check viewtype, is string, not interactive --- .../contrib/notebook/browser/notebook.contribution.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index 18d3062d731e9..4521abd7ed4f5 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -613,7 +613,10 @@ class SimpleNotebookWorkingCopyEditorHandler extends Disposable implements IWork await this._extensionService.whenInstalledExtensionsRegistered(); this._register(this._workingCopyEditorService.registerHandler({ - handles: workingCopy => typeof this._getViewType(workingCopy) && workingCopy.resource.scheme !== Schemas.vscodeInteractive, + handles: workingCopy => { + const viewType = this._getViewType(workingCopy); + return typeof viewType === 'string' && viewType !== 'interactive'; + }, isOpen: (workingCopy, editor) => editor instanceof NotebookEditorInput && editor.viewType === this._getViewType(workingCopy) && isEqual(workingCopy.resource, editor.resource), createEditor: workingCopy => NotebookEditorInput.create(this._instantiationService, workingCopy.resource, this._getViewType(workingCopy)!) }));