Skip to content

Commit

Permalink
Small tweaks to widget reveal
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornix committed Feb 13, 2024
1 parent a16faa3 commit 4ebc4f8
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,12 @@ export class NotebookChatController extends Disposable implements INotebookEdito

this._notebookEditor.revealOffsetInCenterIfOutsideViewport(cellTop + cellHeight);
} else {
const cell = this._notebookEditor.cellAt(index);
const cell = this._notebookEditor.cellAt(index - 1);
if (cell) {
this._notebookEditor.revealInCenterIfOutsideViewport(cell);
const cellTop = this._notebookEditor.getAbsoluteTopOfElement(cell);
const cellHeight = this._notebookEditor.getHeightOfElement(cell);

this._notebookEditor.revealOffsetInCenterIfOutsideViewport(cellTop + cellHeight);
}
}
}
Expand Down

0 comments on commit 4ebc4f8

Please sign in to comment.