diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 7d92a5c4ce2..d36c3851ec7 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 9d2137fc2cc..f1a9bd8a998 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 0f54554f835..118c4fada67 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 974ee0762c2..12f76a8241b 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 {