mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
add replaceCells to notebook edit builder, also refactor cell source to only be a string, not an array
This commit is contained in:
@@ -452,7 +452,7 @@ export class MainThreadNotebooks extends Disposable implements MainThreadNoteboo
|
||||
if (data.cells.length) {
|
||||
textModel.initialize(data!.cells);
|
||||
} else {
|
||||
const mainCell = textModel.createCellTextModel([''], textModel.languages.length ? textModel.languages[0] : '', CellKind.Code, [], undefined);
|
||||
const mainCell = textModel.createCellTextModel('', textModel.languages.length ? textModel.languages[0] : '', CellKind.Code, [], undefined);
|
||||
textModel.insertTemplateCell(mainCell);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user