create "real" TextDocument when opening a notebook or when adding cells, don't create them again when the renderer makes models

This commit is contained in:
Johannes Rieken
2020-07-17 11:02:08 +02:00
parent c4dae68b49
commit 00dea1c4ad
8 changed files with 188 additions and 165 deletions

View File

@@ -69,8 +69,8 @@ export class ExtHostDocuments implements ExtHostDocumentsShape {
public getDocument(resource: vscode.Uri): vscode.TextDocument {
const data = this.getDocumentData(resource);
if (!data || !data.document) {
throw new Error('Unable to retrieve document from URI');
if (!data?.document) {
throw new Error(`Unable to retrieve document from URI '${resource}'`);
}
return data.document;
}