Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions src/vs/workbench/api/browser/mainThreadCustomEditors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class MainThreadCustomEditorModel extends ResourceWorkingCopy implements ICustom
private _currentEditIndex: number = -1;
private _savePoint: number = -1;
private readonly _edits: Array<number> = [];
private _isDirtyFromContentChange = false;
private _isDirtyFromContentChange: boolean;

private _ongoingSave?: CancelablePromise<void>;

Expand Down Expand Up @@ -390,18 +390,17 @@ class MainThreadCustomEditorModel extends ResourceWorkingCopy implements ICustom

this._fromBackup = fromBackup;

// Normally means we're re-opening an untitled file (set this before registering the working copy
// so that dirty state is correct when first queried).
this._isDirtyFromContentChange = startDirty;

if (_editable) {
this._register(workingCopyService.registerWorkingCopy(this));

this._register(extensionService.onWillStop(e => {
e.veto(true, localize('vetoExtHostRestart', "An extension provided editor for '{0}' is still open that would close otherwise.", this.name));
}));
}

// Normally means we're re-opening an untitled file
if (startDirty) {
this._isDirtyFromContentChange = true;
}
}

get editorResource() {
Expand Down
Loading