mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-06 14:48:45 +01:00
fixes #83782
This commit is contained in:
1 parent
a8cd55799d
commit
d3b22c19a2
1 file changed
+4
-6
@@ -466,18 +466,16 @@ class ViewModel {
|
||||
}
|
||||
|
||||
private onDidSpliceGroup(item: IGroupItem, { start, deleteCount, toInsert }: ISplice<ISCMResource>): void {
|
||||
if (this._mode === ViewModelMode.Tree) {
|
||||
for (const resource of toInsert) {
|
||||
item.tree.add(resource.sourceUri, resource);
|
||||
}
|
||||
}
|
||||
|
||||
const deleted = item.resources.splice(start, deleteCount, ...toInsert);
|
||||
|
||||
if (this._mode === ViewModelMode.Tree) {
|
||||
for (const resource of deleted) {
|
||||
item.tree.delete(resource.sourceUri);
|
||||
}
|
||||
|
||||
for (const resource of toInsert) {
|
||||
item.tree.add(resource.sourceUri, resource);
|
||||
}
|
||||
}
|
||||
|
||||
this.refresh(item);
|
||||
|
||||
Reference in new issue
Block a user