This commit is contained in:
Sandeep Somavarapu
2020-05-21 01:57:55 +02:00
parent 7b21def08d
commit ebaa7b5ff8
@@ -525,11 +525,13 @@ export class ConfigurationEditingService {
const model = reference.object.textEditorModel;
if (this.hasParseErrors(model, operation)) {
reference.dispose();
return this.reject<typeof reference>(ConfigurationEditingErrorCode.ERROR_INVALID_CONFIGURATION, target, operation);
}
// Target cannot be dirty if not writing into buffer
if (checkDirty && operation.resource && this.textFileService.isDirty(operation.resource)) {
reference.dispose();
return this.reject<typeof reference>(ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY, target, operation);
}
return reference;