diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorInput.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorInput.ts index abc3dfd2f7755db3effde58b7c506c2e09c308f1..7f53d24bdda6401c319db6c37e352c6023d37adc 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorInput.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorInput.ts @@ -96,7 +96,7 @@ export class NotebookEditorInput extends EditorInput { private static readonly _instances = new Map(); static getOrCreate(instantiationService: IInstantiationService, resource: URI, name: string, viewType: string | undefined) { - const key = name + viewType; + const key = resource.toString() + viewType; let input = NotebookEditorInput._instances.get(key); if (!input) { input = instantiationService.createInstance(class extends NotebookEditorInput {