mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-14 16:04:09 +01:00
fixes #83782
This commit is contained in:
@@ -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