diff --git a/lib/widget.js b/lib/widget.js index ae247aa..bfaec8c 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -1244,7 +1244,11 @@ ProgressBar.prototype.render = function(stop) { var xi = ret.xi , xl = ret.xl , yi = ret.yi - , yl = ret.yl; + , yl = ret.yl + , cell + , ch + , x + , y; var lines = this.screen.lines; @@ -1257,12 +1261,11 @@ ProgressBar.prototype.render = function(stop) { for (y = yi; y < yl; y++) { if (!lines[y]) break; for (x = xi; x < xl; x++) { - attr = dattr; ch = this.ch; cell = lines[y][x]; if (!cell) break; - if (attr !== cell[0] || ch !== cell[1]) { - lines[y][x][0] = attr; + if (dattr !== cell[0] || ch !== cell[1]) { + lines[y][x][0] = dattr; lines[y][x][1] = ch; lines[y].dirty = true; }