mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-29 04:53:33 +01:00
selections[0] is primary.
This commit is contained in:
@@ -175,8 +175,9 @@ export class ExtHostNotebookEditor {
|
||||
this._visibleRanges = value;
|
||||
}
|
||||
|
||||
_acceptSelections(primary: number | null, selections: ICellRange[]): void {
|
||||
this._selection = primary !== null ? this.notebookData.getCellFromIndex(primary)?.cell : undefined;
|
||||
_acceptSelections(selections: ICellRange[]): void {
|
||||
const primarySelection = selections[0];
|
||||
this._selection = primarySelection ? this.notebookData.getCellFromIndex(primarySelection.start)?.cell : undefined;
|
||||
this._selections = selections.map(val => new extHostTypes.NotebookCellRange(val.start, val.end));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user