Skip to content

Commit b353717

Browse files
committed
large cell should not override firstLine behavior
1 parent e06ad01 commit b353717

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,8 +838,8 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
838838
const firstIndex = this.view.firstVisibleIndex;
839839
const elementHeight = this.view.elementHeight(viewIndex);
840840

841-
if (viewIndex <= firstIndex || elementHeight >= this.view.renderHeight) {
842-
this._revealInternal(viewIndex, true, CellRevealPosition.Top, firstLine);
841+
if (viewIndex <= firstIndex || (!firstLine && elementHeight >= this.view.renderHeight)) {
842+
this._revealInternal(viewIndex, true, CellRevealPosition.Top);
843843
} else {
844844
this._revealInternal(viewIndex, true, CellRevealPosition.Bottom, firstLine);
845845
}

0 commit comments

Comments
 (0)