mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
Merge pull request #138657 from microsoft/sandy081/fix129861
Save through text model service if model is dirty
This commit is contained in:
commit
7a1a06a0fc
|
@ -181,7 +181,8 @@ export class ConfigurationEditingService {
|
|||
const reference = await this.resolveModelReference(resource);
|
||||
try {
|
||||
const formattingOptions = this.getFormattingOptions(reference.object.textEditorModel);
|
||||
if (this.uriIdentityService.extUri.isEqual(resource, this.environmentService.settingsResource)) {
|
||||
if (!this.textFileService.isDirty(resource) /* go through text model save if the model is dirty */
|
||||
&& this.uriIdentityService.extUri.isEqual(resource, this.environmentService.settingsResource)) {
|
||||
await this.userConfigurationFileService.updateSettings({ path: operation.jsonPath, value: operation.value }, formattingOptions);
|
||||
} else {
|
||||
await this.updateConfiguration(operation, reference.object.textEditorModel, formattingOptions);
|
||||
|
|
Loading…
Reference in a new issue