diff --git a/lib/widget.js b/lib/widget.js index 013ff56..3670e94 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -753,6 +753,11 @@ Screen.prototype.deleteTop = function(top, bottom) { Screen.prototype.cleanSides = function(el) { var pos = el.lpos; + // If we don't have tput, we can't use CSR anyway. + // if (!this.tput) { + // return false; + // } + if (!pos) { return false; } @@ -771,9 +776,15 @@ Screen.prototype.cleanSides = function(el) { // The scrollbar can't update properly, and there's also a // chance that the scrollbar may get moved around senselessly. - if (this.scrollbar) { - return false; - } + // NOTE: In pratice, this doesn't seem to be the case. + // if (this.scrollbar) { + // return false; + // } + + // Doesn't matter if we're only a height of 1. + // if ((pos.yl - el.ibottom) - (pos.yi + el.itop) <= 1) { + // return pos._cleanSides = false; + // } var yi = pos.yi + el.itop , yl = pos.yl - el.ibottom