debt - do not ignore dirty when invoking save participants
if a save participant changes the model and the save fails, the document is not marked as dirty
This commit is contained in:
parent
7a8596fd4b
commit
9cda3b7bda
|
@ -627,13 +627,9 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
|
|||
// Save participants can also be skipped through API.
|
||||
if (this.isResolved() && this.textFileService.saveParticipant && !options.skipSaveParticipants) {
|
||||
try {
|
||||
this.ignoreDirtyOnModelContentChange = true;
|
||||
|
||||
await this.textFileService.saveParticipant.participate(this, { reason: options.reason ?? SaveReason.EXPLICIT }, saveParticipantCancellation.token);
|
||||
} catch (error) {
|
||||
// Ignore
|
||||
} finally {
|
||||
this.ignoreDirtyOnModelContentChange = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue