From 9cda3b7bda1d4cfa851760e0077667f8068f36ab Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 14 Feb 2020 09:31:20 +0100 Subject: [PATCH] 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 --- .../workbench/services/textfile/common/textFileEditorModel.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts index 15c92a28b1b..d5957f7c7d4 100644 --- a/src/vs/workbench/services/textfile/common/textFileEditorModel.ts +++ b/src/vs/workbench/services/textfile/common/textFileEditorModel.ts @@ -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; } }