From 34e451bbfa2b85aed2b13c39f5874a6a92f81142 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 13 Aug 2013 13:02:02 -0500 Subject: [PATCH] minor fix. potential fixes. --- lib/widget.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/widget.js b/lib/widget.js index 4f2662b..c590460 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -1857,6 +1857,10 @@ function Element(options) { self.parseContent(); }); + // this.on('detach', function() { + // delete self._lpos; + // }); + if (options.hoverBg != null) { options.hoverEffects = options.hoverEffects || {}; options.hoverEffects.bg = options.hoverBg; @@ -3083,6 +3087,10 @@ Element.prototype.render = function() { ch = content[ci++] || bch; + // if (!content[ci] && !coords._contentEnd) { + // coords._contentEnd = { x: x - xi, y: y - yi }; + // } + // Handle escape codes. while (ch === '\x1b') { if (c = /^\x1b\[[\d;]*m/.exec(content.substring(ci - 1))) { @@ -3759,7 +3767,7 @@ ScrollableBox.prototype.scroll = function(offset, always) { // or if we **really** want shrinkable // scrolling elements. // p = this._getCoords(); - if (this.childBase !== base && this.screen.cleanSides(this)) { + if (p && this.childBase !== base && this.screen.cleanSides(this)) { t = p.yi + this.itop; b = p.yl - this.ibottom - 1; d = this.childBase - base;