From 4f32f4069d8261b0eaaa2e44707a0b6deaec1445 Mon Sep 17 00:00:00 2001 From: Erik De Bonte Date: Wed, 12 Oct 2022 14:25:34 -0700 Subject: [PATCH] WIP --- src/vs/workbench/api/common/extHostNotebookDocument.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/api/common/extHostNotebookDocument.ts b/src/vs/workbench/api/common/extHostNotebookDocument.ts index 38437605cec..c85ddcf2dc6 100644 --- a/src/vs/workbench/api/common/extHostNotebookDocument.ts +++ b/src/vs/workbench/api/common/extHostNotebookDocument.ts @@ -247,7 +247,7 @@ export class ExtHostNotebookDocument { this._spliceNotebookCells(rawEvent.changes, false, result.contentChanges); } else if (rawEvent.kind === notebookCommon.NotebookCellsChangeType.Move) { - this._moveCell(rawEvent.index, rawEvent.newIdx, result.contentChanges); + this._moveCells(rawEvent.index, rawEvent.length, rawEvent.newIdx, result.contentChanges); } else if (rawEvent.kind === notebookCommon.NotebookCellsChangeType.Output) { this._setCellOutputs(rawEvent.index, rawEvent.outputs); @@ -387,8 +387,8 @@ export class ExtHostNotebookDocument { } } - private _moveCell(index: number, newIdx: number, bucket: vscode.NotebookDocumentContentChange[]): void { - const cells = this._cells.splice(index, 1); + private _moveCells(index: number, length: number, newIdx: number, bucket: vscode.NotebookDocumentContentChange[]): void { + const cells = this._cells.splice(index, length); this._cells.splice(newIdx, 0, ...cells); const changes = [ new RawContentChangeEvent(index, 1, cells.map(c => c.apiCell), []),