mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
parent
1f913a81b1
commit
1e9c0a643e
|
@ -1385,7 +1385,8 @@ abstract class ChangeNotebookCellMetadataAction extends NotebookCellAction {
|
|||
|
||||
const metadataDelta = this.getMetadataDelta();
|
||||
const edits: ICellEditOperation[] = [];
|
||||
for (const cell of context.selectedCells || []) {
|
||||
const targetCells = (context.cell ? [context.cell] : context.selectedCells) ?? [];
|
||||
for (const cell of targetCells) {
|
||||
const index = textModel.cells.indexOf(cell.model);
|
||||
if (index >= 0) {
|
||||
edits.push({ editType: CellEditType.Metadata, index, metadata: { ...context.cell.metadata, ...metadataDelta } });
|
||||
|
|
Loading…
Reference in a new issue