From 148a1ca4bd890aa4743327988070da0546180dd2 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Wed, 18 Dec 2024 17:41:28 +0100 Subject: [PATCH] TreeView: MaxCallStackError - Nesting (#236493) Part of #233056 --- src/vs/base/browser/ui/list/listView.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/base/browser/ui/list/listView.ts b/src/vs/base/browser/ui/list/listView.ts index e149029df4f..00a19352e91 100644 --- a/src/vs/base/browser/ui/list/listView.ts +++ b/src/vs/base/browser/ui/list/listView.ts @@ -9,7 +9,7 @@ import { DomEmitter } from '../../event.js'; import { IMouseWheelEvent } from '../../mouseEvent.js'; import { EventType as TouchEventType, Gesture, GestureEvent } from '../../touch.js'; import { SmoothScrollableElement } from '../scrollbar/scrollableElement.js'; -import { distinct, equals } from '../../../common/arrays.js'; +import { distinct, equals, splice } from '../../../common/arrays.js'; import { Delayer, disposableTimeout } from '../../../common/async.js'; import { memoize } from '../../../common/decorators.js'; import { Emitter, Event, IValueWithChangeEvent } from '../../../common/event.js'; @@ -643,7 +643,7 @@ export class ListView implements IListView { this.items = inserted; } else { this.rangeMap.splice(start, deleteCount, inserted); - deleted = this.items.splice(start, deleteCount, ...inserted); + deleted = splice(this.items, start, deleteCount, inserted); } const delta = elements.length - deleteCount;