mirror of
https://github.com/embarklabs/neo-blessed.git
synced 2025-02-23 08:08:16 +00:00
fix max scroll lines number.
This commit is contained in:
parent
4683b1d542
commit
158572ae38
@ -2592,7 +2592,7 @@ ScrollableText.prototype.scroll = function(offset) {
|
||||
if (this.content != null) {
|
||||
this.parseContent();
|
||||
|
||||
max = this._clines.length - 1 - (this.height - (this.border ? 2 : 0) - this.padding * 2);
|
||||
max = this._clines.length - (this.height - (this.border ? 2 : 0) - this.padding * 2);
|
||||
if (max < 0) max = 0;
|
||||
|
||||
if (cb > max) {
|
||||
@ -2613,7 +2613,7 @@ ScrollableText.prototype.scroll = function(offset) {
|
||||
ScrollableText.prototype._recalculateIndex = function() {
|
||||
if (this.detached) return;
|
||||
|
||||
var max = this._clines.length - 1 - (this.height - (this.border ? 2 : 0) - this.padding * 2);
|
||||
var max = this._clines.length - (this.height - (this.border ? 2 : 0) - this.padding * 2);
|
||||
if (max < 0) max = 0;
|
||||
|
||||
if (this.childBase > max) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user