mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 09:08:53 +01:00
multi selection in notebook
This commit is contained in:
@@ -651,8 +651,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
|
||||
|
||||
if (data.selections) {
|
||||
if (data.selections.selections.length) {
|
||||
const firstCell = data.selections.selections[0];
|
||||
editor.editor.selection = editor.editor.notebookData.getCell(firstCell)?.cell;
|
||||
editor.editor.selection = data.selections.selections.map(cellHandle => editor?.editor.notebookData.getCell(cellHandle)?.cell).filter(selection => selection !== undefined) as vscode.NotebookCell[];
|
||||
} else {
|
||||
editor.editor.selection = undefined;
|
||||
}
|
||||
@@ -695,8 +694,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape, ExtHostN
|
||||
);
|
||||
|
||||
if (selections.length) {
|
||||
const firstCell = selections[0];
|
||||
editor.selection = editor.notebookData.getCell(firstCell)?.cell;
|
||||
editor.selection = selections.map(cellHandle => editor.notebookData.getCell(cellHandle)?.cell).filter(selection => selection !== undefined) as vscode.NotebookCell[];
|
||||
} else {
|
||||
editor.selection = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user