fix #119767.
This commit is contained in:
parent
1d3cbad010
commit
f0eacf8770
1 changed files with 8 additions and 0 deletions
|
@ -693,6 +693,9 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
|
|||
super.setSelection(indexes, browserEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* The range will be revealed with as little scrolling as possible.
|
||||
*/
|
||||
revealElementsInView(range: ICellRange) {
|
||||
const startIndex = this._getViewIndexUpperBound2(range.start);
|
||||
|
||||
|
@ -713,6 +716,11 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
|
|||
const endElementTop = this.view.elementTop(endIndex);
|
||||
const endElementHeight = this.view.elementHeight(endIndex);
|
||||
|
||||
if (endElementTop + endElementHeight <= wrapperBottom) {
|
||||
// fully visible
|
||||
return;
|
||||
}
|
||||
|
||||
if (endElementTop >= wrapperBottom) {
|
||||
return this._revealInternal(endIndex, false, CellRevealPosition.Bottom);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue