mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
fold element should focus the cell.
This commit is contained in:
parent
5e067109a3
commit
5428ab54c9
|
@ -134,6 +134,7 @@ export class FoldingController extends Disposable implements INotebookEditorCont
|
|||
}
|
||||
|
||||
this.setFoldingStateUp(modelIndex, state === CellFoldingState.Collapsed ? CellFoldingState.Expanded : CellFoldingState.Collapsed, 1);
|
||||
this._notebookEditor.focusElement(cellViewModel);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
@ -501,7 +501,7 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
|
|||
}
|
||||
|
||||
const selectionsLeft = [];
|
||||
this._viewModel!.selectionHandles.forEach(handle => {
|
||||
this.getSelectedElements().map(el => el.handle).forEach(handle => {
|
||||
if (this._viewModel!.hasCell(handle)) {
|
||||
selectionsLeft.push(handle);
|
||||
}
|
||||
|
@ -579,10 +579,6 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
|
|||
}
|
||||
|
||||
selectElement(cell: ICellViewModel) {
|
||||
if (this._viewModel) {
|
||||
this._viewModel.selectionHandles = [cell.handle];
|
||||
}
|
||||
|
||||
const index = this._getViewIndexUpperBound(cell);
|
||||
if (index >= 0) {
|
||||
this.setSelection([index]);
|
||||
|
|
Loading…
Reference in a new issue