Skip to content

Commit

Permalink
check viewtype, is string, not interactive
Browse files Browse the repository at this point in the history
  • Loading branch information
amunger committed Jan 25, 2023
1 parent 39da966 commit f16ff38
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)!)
}));
Expand Down

0 comments on commit f16ff38

Please sign in to comment.