diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 7d92a5c4ce25ad1c41f95de59e27ce99f5bee4ea..d36c3851ec72563709af32148a0e8c09ce7fb959 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -1299,7 +1299,7 @@ declare module 'vscode' { viewColumn?: ViewColumn; preserveFocus?: boolean; preview?: boolean; - selection?: NotebookCellRange; + selections?: NotebookCellRange[]; } export namespace notebook { diff --git a/src/vs/workbench/api/browser/mainThreadNotebookEditors.ts b/src/vs/workbench/api/browser/mainThreadNotebookEditors.ts index 9d2137fc2cc9a5332d63f418c21a915af567635d..f1a9bd8a99808df9d2077527310243c83ffeb03d 100644 --- a/src/vs/workbench/api/browser/mainThreadNotebookEditors.ts +++ b/src/vs/workbench/api/browser/mainThreadNotebookEditors.ts @@ -130,7 +130,7 @@ export class MainThreadNotebookEditors implements MainThreadNotebookEditorsShape async $tryShowNotebookDocument(resource: UriComponents, viewType: string, options: INotebookDocumentShowOptions): Promise { const editorOptions = new NotebookEditorOptions({ - cellSelections: options.selection && [options.selection], + cellSelections: options.selections, preserveFocus: options.preserveFocus, pinned: options.pinned, // selection: options.selection, diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 0f54554f8358f49bf386b031fd074713fe6621a9..118c4fada67151f5125ff3787f4025b3c5f9bb73 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -861,7 +861,7 @@ export interface INotebookDocumentShowOptions { position?: EditorGroupColumn; preserveFocus?: boolean; pinned?: boolean; - selection?: ICellRange; + selections?: ICellRange[]; } export type INotebookCellStatusBarEntryDto = Dto; diff --git a/src/vs/workbench/api/common/extHostNotebook.ts b/src/vs/workbench/api/common/extHostNotebook.ts index 974ee0762c2c0f714672cbaaab8280cb2ee4f56b..12f76a8241b62d3610783c0fd27995bc7b3b8b7a 100644 --- a/src/vs/workbench/api/common/extHostNotebook.ts +++ b/src/vs/workbench/api/common/extHostNotebook.ts @@ -416,7 +416,7 @@ export class ExtHostNotebookController implements ExtHostNotebookShape { resolvedOptions = { position: typeConverters.ViewColumn.from(options.viewColumn), preserveFocus: options.preserveFocus, - selection: options.selection && typeConverters.NotebookCellRange.from(options.selection), + selections: options.selections && options.selections.map(typeConverters.NotebookCellRange.from), pinned: typeof options.preview === 'boolean' ? !options.preview : undefined }; } else {