mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
WIP
This commit is contained in:
@@ -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), []),
|
||||
|
||||
Reference in New Issue
Block a user