re #128373.
This commit is contained in:
parent
15ddc3c3ba
commit
2bceb8123d
1 changed files with 8 additions and 2 deletions
|
@ -190,8 +190,14 @@ export class MainThreadNotebookEditors implements MainThreadNotebookEditorsShape
|
|||
|
||||
$trySetSelections(id: string, ranges: ICellRange[]): void {
|
||||
const editor = this._notebookEditorService.getNotebookEditor(id);
|
||||
if (editor) {
|
||||
editor.setSelections(ranges);
|
||||
if (!editor) {
|
||||
return;
|
||||
}
|
||||
|
||||
editor.setSelections(ranges);
|
||||
|
||||
if (ranges.length) {
|
||||
editor.setFocus({ start: ranges[0].start, end: ranges[0].start + 1 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue