File tree Expand file tree Collapse file tree
src/vs/workbench/contrib/notebook/browser/view/renderers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -748,10 +748,10 @@ export class CellDragAndDropController extends Disposable {
748748 private async moveCells ( draggedCells : ICellViewModel [ ] , ontoCell : ICellViewModel , direction : 'above' | 'below' ) {
749749 this . notebookEditor . textModel ! . pushStackElement ( 'Move Cells' ) ;
750750 if ( direction === 'above' ) {
751- const relativeToIndex = this . notebookEditor ! . viewModel ! . getCellIndex ( ontoCell ) ;
752- const newIdx = relativeToIndex ;
751+ for ( let i = 0 ; i < draggedCells . length ; i ++ ) {
752+ const relativeToIndex = this . notebookEditor ! . viewModel ! . getCellIndex ( ontoCell ) ;
753+ const newIdx = relativeToIndex ;
753754
754- for ( let i = draggedCells . length - 1 ; i >= 0 ; i -- ) {
755755 await this . notebookEditor . moveCellToIdx ( draggedCells [ i ] , newIdx ) ;
756756 }
757757 } else {
You can’t perform that action at this time.
0 commit comments