File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/vs/workbench/contrib/debug/browser Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -588,7 +588,9 @@ export class Repl extends ViewPane implements IHistoryNavigationWidget {
588
588
589
589
this . _register ( this . tree . onDidChangeContentHeight ( ( ) => {
590
590
if ( this . tree . scrollHeight !== this . previousTreeScrollHeight ) {
591
- const lastElementWasVisible = this . tree . scrollTop + this . tree . renderHeight >= this . previousTreeScrollHeight ;
591
+ // Due to rounding, the scrollTop + renderHeight will not exactly match the scrollHeight.
592
+ // Consider the tree to be scrolled all the way down if it is within 2px of the bottom.
593
+ const lastElementWasVisible = this . tree . scrollTop + this . tree . renderHeight >= this . previousTreeScrollHeight - 2 ;
592
594
if ( lastElementWasVisible ) {
593
595
setTimeout ( ( ) => {
594
596
// Can't set scrollTop during this event listener, the list might overwrite the change
You can’t perform that action at this time.
0 commit comments