Refine notebookEditor proposal (#149656)

For #149271

- `NotebookEditor.document` -> `NotebookEditor.notebook`

- Add `selection` to for setting primary selections. Matches `TextDocument.selection`

- Deprecate `showNotebookDocument`
This commit is contained in:
Matt Bierner
2022-05-16 11:17:36 -07:00
committed by GitHub
parent a3164a3219
commit cfbf3d5dd7
2 changed files with 29 additions and 6 deletions

View File

@@ -105,6 +105,15 @@ export class ExtHostNotebookEditor {
get document() {
return that.notebookData.apiNotebook;
},
get notebook() {
return that.notebookData.apiNotebook;
},
get selection() {
return that._selections[0];
},
set selection(selection: vscode.NotebookRange) {
this.selections = [selection];
},
get selections() {
return that._selections;
},