large cell should not override firstLine behavior

This commit is contained in:
Aaron Munger 2023-10-25 09:52:58 -07:00 committed by Aaron Munger
parent e06ad018da
commit b353717a67

View file

@ -838,8 +838,8 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
const firstIndex = this.view.firstVisibleIndex;
const elementHeight = this.view.elementHeight(viewIndex);
if (viewIndex <= firstIndex || elementHeight >= this.view.renderHeight) {
this._revealInternal(viewIndex, true, CellRevealPosition.Top, firstLine);
if (viewIndex <= firstIndex || (!firstLine && elementHeight >= this.view.renderHeight)) {
this._revealInternal(viewIndex, true, CellRevealPosition.Top);
} else {
this._revealInternal(viewIndex, true, CellRevealPosition.Bottom, firstLine);
}