未验证 提交 f0eacf87 编写于 作者: R rebornix

fix #119767.

上级 1d3cbad0
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册