-
Notifications
You must be signed in to change notification settings - Fork 31k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not dirty if auto-save soon without any save error state #189345
Conversation
cc @bpasero |
@amunger fyi stored file working copies know if they are in error state from saving or not, see: vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.ts Lines 134 to 140 in ee5d95e
|
ah, thanks. That makes things simpler. I can also include conflict state in the same way, though I never figured if that would apply to notebooks. |
@amunger conflict state is also an error state, so I think you are fine: vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.ts Lines 1068 to 1074 in 1e0b12d
|
@@ -133,7 +149,7 @@ export class SimpleNotebookEditorModel extends EditorModel implements INotebookE | |||
this._workingCopyListeners.add(this._workingCopy.onDidChangeOrphaned(() => this._onDidChangeOrphaned.fire())); | |||
this._workingCopyListeners.add(this._workingCopy.onDidChangeReadonly(() => this._onDidChangeReadonly.fire())); | |||
} | |||
this._workingCopy.onDidChangeDirty(() => this._onDidChangeDirty.fire(), undefined, this._workingCopyListeners); | |||
this._workingCopyListeners.add(this._workingCopy.onDidChangeDirty(() => this._onDidChangeDirty.fire(), undefined, this._workingCopyListeners)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amunger fyi this is not needed, you already pass the this._workingCopyListeners
in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, I was wondering about that. It stands out as the only listener that was disposed that way in this method
fixes #140069