diff --git a/lib/node_modules/@stdlib/repl/lib/output_stream.js b/lib/node_modules/@stdlib/repl/lib/output_stream.js index 98474cad80e9..fc0ab1d4e056 100644 --- a/lib/node_modules/@stdlib/repl/lib/output_stream.js +++ b/lib/node_modules/@stdlib/repl/lib/output_stream.js @@ -271,7 +271,7 @@ setNonEnumerableReadOnly( OutputStream.prototype, '_pagerHeight', function pager if ( vh < MIN_VIEWPORT_HEIGHT ) { return -1; } - return vh - RESERVED_PAGING_ROWS; + return vh - RESERVED_PAGING_ROWS; // FIXME: reserved paging rows being a constant assumes that the input prompt spans just 1 row. This might not be the case with multi-line inputs triggering the pager as it will result in an incomplete UI with only the last line of the multi-line input visible in the pager view. }); /** @@ -285,8 +285,8 @@ setNonEnumerableReadOnly( OutputStream.prototype, '_pagerHeight', function pager * @returns {boolean} boolean indicating whether content is "scrollable" */ setNonEnumerableReadOnly( OutputStream.prototype, '_isScrollable', function isScrollable( N ) { - var h = this._pagerHeight(); - return ( h > 0 && N > h ); + var vh = this._repl.viewportHeight(); + return ( vh >= MIN_VIEWPORT_HEIGHT && N > vh - 2 ); // 2 rows reserved for the input and the next prompt }); /**