Skip to content

Commit

Permalink
SCM - fix resource comparison (#227197)
Browse files Browse the repository at this point in the history
  • Loading branch information
lszomoru authored Aug 30, 2024
1 parent 964b129 commit 135a89c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vs/workbench/api/common/extHostSCM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,22 @@ function compareResourceStates(a: vscode.SourceControlResourceState, b: vscode.S
return -1;
}

if (result !== 0) {
return result;
}

if (a.multiFileDiffEditorModifiedUri && b.multiFileDiffEditorModifiedUri) {
result = comparePaths(a.multiFileDiffEditorModifiedUri.fsPath, b.multiFileDiffEditorModifiedUri.fsPath, true);
} else if (a.multiFileDiffEditorModifiedUri) {
return 1;
} else if (b.multiFileDiffEditorModifiedUri) {
return -1;
}

if (result !== 0) {
return result;
}

if (a.multiDiffEditorOriginalUri && b.multiDiffEditorOriginalUri) {
result = comparePaths(a.multiDiffEditorOriginalUri.fsPath, b.multiDiffEditorOriginalUri.fsPath, true);
} else if (a.multiDiffEditorOriginalUri) {
Expand Down

0 comments on commit 135a89c

Please sign in to comment.