Skip to content

Commit 51cd8d2

Browse files
authored
Ensure save works after saving untitled notebooks (#11190)
* Ensure save works after saving untitled notebooks * Remove old document
1 parent 4b3dff0 commit 51cd8d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/client/datascience/interactive-ipynb/nativeEditorProviderOld.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ export class NativeEditorProviderOld extends NativeEditorProvider {
6666
const customDocument = this.customDocuments.get(resource.fsPath);
6767
if (customDocument) {
6868
await this.saveAs(customDocument, targetResource);
69+
this.customDocuments.delete(resource.fsPath);
70+
this.customDocuments.set(targetResource.fsPath, { ...customDocument, uri: targetResource });
6971
}
7072
}
7173
)

0 commit comments

Comments
 (0)