mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 01:25:37 -05:00
Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 (#8911)
* Merge from vscode a234f13c45b40a0929777cb440ee011b7549eed2 * update distro * fix layering * update distro * fix tests
This commit is contained in:
@@ -16,7 +16,7 @@ import { ITextModelService } from 'vs/editor/common/services/resolverService';
|
||||
import { INotebookModel, IContentManager, NotebookContentChange } from 'sql/workbench/contrib/notebook/browser/models/modelInterfaces';
|
||||
import { TextFileEditorModel } from 'vs/workbench/services/textfile/common/textFileEditorModel';
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { StateChange, ITextFileSaveOptions } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { ITextFileSaveOptions } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { LocalContentManager } from 'sql/workbench/services/notebook/common/localContentManager';
|
||||
import { IConnectionProfile } from 'sql/platform/connection/common/interfaces';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
@@ -73,12 +73,14 @@ export class NotebookEditorModel extends EditorModel {
|
||||
}));
|
||||
} else {
|
||||
if (this.textEditorModel instanceof TextFileEditorModel) {
|
||||
this._register(this.textEditorModel.onDidStateChange(change => {
|
||||
this._register(this.textEditorModel.onDidSave(() => {
|
||||
let dirty = this.textEditorModel instanceof ResourceEditorModel ? false : this.textEditorModel.isDirty();
|
||||
this.setDirty(dirty);
|
||||
this.sendNotebookSerializationStateChange();
|
||||
}));
|
||||
this._register(this.textEditorModel.onDidChangeDirty(() => {
|
||||
let dirty = this.textEditorModel instanceof ResourceEditorModel ? false : this.textEditorModel.isDirty();
|
||||
this.setDirty(dirty);
|
||||
if (change === StateChange.SAVED) {
|
||||
this.sendNotebookSerializationStateChange();
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user