comments. enable csr for elements with scrollbars.

This commit is contained in:
Christopher Jeffrey 2013-07-27 08:13:00 -05:00
parent d9ca7112bc
commit 38473b6bfa
1 changed files with 14 additions and 3 deletions

View File

@ -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