From 5969851ea2b545d37e82bd0858a99519d1578e29 Mon Sep 17 00:00:00 2001 From: Peter van Gulik Date: Mon, 11 Mar 2024 15:48:06 +0100 Subject: [PATCH] fix: do not sort profiles when adding new fields --- .../src/commands/profiles/updateProfileCommand.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vscode-extension/src/commands/profiles/updateProfileCommand.ts b/packages/vscode-extension/src/commands/profiles/updateProfileCommand.ts index 9a629132..061e4ce4 100644 --- a/packages/vscode-extension/src/commands/profiles/updateProfileCommand.ts +++ b/packages/vscode-extension/src/commands/profiles/updateProfileCommand.ts @@ -97,7 +97,7 @@ export default class UpdateRelatedProfileCommand extends MetadataCommand { const profileDoc = await vscode.workspace.openTextDocument(path.resolve(file)); const fullDocumentRange = new vscode.Range(new vscode.Position(0,0), new vscode.Position(profileDoc.lineCount, 0)); this.logger.info(`Updating profile ${profile.name}`); - profileChanges.replace(profileDoc.uri, fullDocumentRange, profile.toXml({ sort: true })); + profileChanges.replace(profileDoc.uri, fullDocumentRange, profile.toXml({ sort: false })); updatedProfiles.push(profile); } await vscode.workspace.applyEdit(profileChanges);