@@ -247,7 +247,7 @@ export class ExtHostNotebookDocument {
247
247
this . _spliceNotebookCells ( rawEvent . changes , false , result . contentChanges ) ;
248
248
249
249
} else if ( rawEvent . kind === notebookCommon . NotebookCellsChangeType . Move ) {
250
- this . _moveCell ( rawEvent . index , rawEvent . newIdx , result . contentChanges ) ;
250
+ this . _moveCells ( rawEvent . index , rawEvent . length , rawEvent . newIdx , result . contentChanges ) ;
251
251
252
252
} else if ( rawEvent . kind === notebookCommon . NotebookCellsChangeType . Output ) {
253
253
this . _setCellOutputs ( rawEvent . index , rawEvent . outputs ) ;
@@ -387,11 +387,11 @@ export class ExtHostNotebookDocument {
387
387
}
388
388
}
389
389
390
- private _moveCell ( index : number , newIdx : number , bucket : vscode . NotebookDocumentContentChange [ ] ) : void {
391
- const cells = this . _cells . splice ( index , 1 ) ;
390
+ private _moveCells ( index : number , length : number , newIdx : number , bucket : vscode . NotebookDocumentContentChange [ ] ) : void {
391
+ const cells = this . _cells . splice ( index , length ) ;
392
392
this . _cells . splice ( newIdx , 0 , ...cells ) ;
393
393
const changes = [
394
- new RawContentChangeEvent ( index , 1 , cells . map ( c => c . apiCell ) , [ ] ) ,
394
+ new RawContentChangeEvent ( index , length , cells . map ( c => c . apiCell ) , [ ] ) ,
395
395
new RawContentChangeEvent ( newIdx , 0 , [ ] , cells )
396
396
] ;
397
397
for ( const change of changes ) {
0 commit comments