Skip to content

Commit 5b9c658

Browse files
authored
SCM - fix diff information lookup bug (microsoft#234309)
1 parent fc5cff7 commit 5b9c658

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/workbench/api/browser/mainThreadEditors.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,9 @@ export class MainThreadTextEditors implements MainThreadTextEditorsShape {
173173
return undefined;
174174
}
175175

176-
const scmQuickDiffChanges = dirtyDiffModel.mapChanges.get(scmQuickDiff.label) ?? [];
177-
const changes = scmQuickDiffChanges.map(index => dirtyDiffModel.changes[index].change);
176+
const changes = dirtyDiffModel.changes
177+
.filter(change => change.label === scmQuickDiff.label)
178+
.map(change => change.change);
178179

179180
return {
180181
original: scmQuickDiff.originalResource,

0 commit comments

Comments
 (0)