mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-01 05:02:35 +01:00
check the model for modified property
This commit is contained in:
@@ -220,7 +220,7 @@ export class InteractiveEditorInput extends EditorInput implements ICompositeNot
|
||||
}
|
||||
|
||||
override isModified() {
|
||||
return true;
|
||||
return this._editorModelReference?.isModified() ?? false;
|
||||
}
|
||||
|
||||
override dispose() {
|
||||
|
||||
@@ -797,6 +797,7 @@ export interface INotebookEditorModel extends IEditorModel {
|
||||
readonly notebook: INotebookTextModel | undefined;
|
||||
isResolved(): this is IResolvedNotebookEditorModel;
|
||||
isDirty(): boolean;
|
||||
isModified(): boolean;
|
||||
isReadonly(): boolean | IMarkdownString;
|
||||
isOrphaned(): boolean;
|
||||
hasAssociatedFilePath(): boolean;
|
||||
|
||||
@@ -85,6 +85,10 @@ export class SimpleNotebookEditorModel extends EditorModel implements INotebookE
|
||||
return this._workingCopy?.isDirty() ?? false;
|
||||
}
|
||||
|
||||
isModified(): boolean {
|
||||
return this._workingCopy?.isModified() ?? false;
|
||||
}
|
||||
|
||||
isOrphaned(): boolean {
|
||||
return SimpleNotebookEditorModel._isStoredFileWorkingCopy(this._workingCopy) && this._workingCopy.hasState(StoredFileWorkingCopyState.ORPHAN);
|
||||
}
|
||||
|
||||
@@ -134,6 +134,10 @@ export class NotebookEditorTestModel extends EditorModel implements INotebookEdi
|
||||
return this._dirty;
|
||||
}
|
||||
|
||||
isModified(): boolean {
|
||||
return this._dirty;
|
||||
}
|
||||
|
||||
getNotebook(): NotebookTextModel {
|
||||
return this._notebook;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user