Skip to content

Commit 88b1879

Browse files
committed
fix microsoft#101681. avoid out of date splice2 triggered by hidden range update.
1 parent bbb1bb5 commit 88b1879

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,10 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
356356

357357
splice2(start: number, deleteCount: number, elements: CellViewModel[] = []): void {
358358
// we need to convert start and delete count based on hidden ranges
359+
if (start < 0 || start > this.view.length) {
360+
return;
361+
}
362+
359363
super.splice(start, deleteCount, elements);
360364

361365
const selectionsLeft = [];

0 commit comments

Comments
 (0)