未验证 提交 439ec79e 编写于 作者: L Logan Ramos

Fix #122637

上级 3d6f88eb
......@@ -44,6 +44,10 @@ export class CustomEditorInput extends LazilyResolvedWebviewEditorInput {
const id = generateUuid();
const webview = accessor.get(IWebviewService).createWebviewOverlay(id, { customClasses: options?.customClasses }, {}, undefined);
const input = instantiationService.createInstance(CustomEditorInput, resource, viewType, id, webview, { untitledDocumentData: untitledDocumentData });
// If we're loading untitled file data we should ensure it's dirty
if (untitledDocumentData) {
input._defaultDirtyState = true;
}
if (typeof group !== 'undefined') {
input.updateGroup(group);
}
......
......@@ -215,6 +215,10 @@ export class ComplexNotebookEditorModel extends EditorModel implements INotebook
private async _loadFromProvider(backupId: string | undefined): Promise<void> {
const untitledData = await this.getUntitledDocumentData(this.resource);
// If we're loading untitled file data we should ensure the model is dirty
if (untitledData) {
this._onDidChangeDirty.fire();
}
const data = await this._contentProvider.open(this.resource, backupId, untitledData, CancellationToken.None);
this._lastResolvedFileStat = await this._resolveStats(this.resource);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册