Skip to content

Commit

Permalink
Fix test failure and improve visibility check (microsoft#210128)
Browse files Browse the repository at this point in the history
* Fix test failure when UI is small

* oops
  • Loading branch information
DonJayamanne authored Apr 11, 2024
1 parent 804f8e3 commit f309a5e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ async function addCellAndRun(code: string, notebook: vscode.NotebookDocument) {
});

function lastCellIsVisible(notebookEditor: vscode.NotebookEditor) {
if (!notebookEditor.visibleRanges.length) {
return false;
}
const lastVisibleCell = notebookEditor.visibleRanges[notebookEditor.visibleRanges.length - 1].end;
return notebookEditor.notebook.cellCount === lastVisibleCell;
}

0 comments on commit f309a5e

Please sign in to comment.