From b353717a67e7b4931b1b1aa96444ab95b48a3ec3 Mon Sep 17 00:00:00 2001 From: Aaron Munger Date: Wed, 25 Oct 2023 09:52:58 -0700 Subject: [PATCH] large cell should not override firstLine behavior --- .../contrib/notebook/browser/view/notebookCellList.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts b/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts index 2e7c3b805f8..f54d78ac851 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts @@ -838,8 +838,8 @@ export class NotebookCellList extends WorkbenchList 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); }