Skip to content

Commit

Permalink
API update for selection change (#5516)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanMatthewHuff authored Apr 14, 2021
1 parent 9e2d5aa commit f6e1d06
Show file tree
Hide file tree
Showing 5 changed files with 898 additions and 817 deletions.
1 change: 1 addition & 0 deletions news/2 Fixes/5515.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update to new selections API.
2 changes: 1 addition & 1 deletion src/test/datascience/notebook/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async function getServices() {

export async function selectCell(notebook: NotebookDocument, start: number, end: number) {
await window.showNotebookDocument(notebook, {
selection: new NotebookCellRange(start, end)
selections: [new NotebookCellRange(start, end)]
});
}

Expand Down
8 changes: 1 addition & 7 deletions types/vscode-proposed/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,6 @@ export interface NotebookEditor {
*/
readonly document: NotebookDocument;

/**
* @deprecated
*/
// todo@API should not be undefined, rather a default
readonly selection?: NotebookCell;

/**
* todo@API should replace selection
* The selections on this notebook editor.
Expand Down Expand Up @@ -418,7 +412,7 @@ export interface NotebookDocumentShowOptions {
viewColumn?: ViewColumn;
preserveFocus?: boolean;
preview?: boolean;
selection?: NotebookCellRange;
selections?: NotebookCellRange[];
}

export namespace notebook {
Expand Down
Loading

0 comments on commit f6e1d06

Please sign in to comment.