diff --git a/lib/widget.js b/lib/widget.js index a6f7e18..bea3f41 100644 --- a/lib/widget.js +++ b/lib/widget.js @@ -7141,6 +7141,7 @@ Table.prototype.render = function() { // Apply attributes to header cells and cells. // Problem: Does not allow for tags in cells. // for (var y = this.iheight / 2; y < height; y++) { + // if (!lines[yi + y]) break; // for (var x = this.iwidth / 2; x < width; x++) { // if (y === this.iheight / 2) { // lines[yi + y][xi + x][0] = header; @@ -7155,6 +7156,7 @@ Table.prototype.render = function() { // Draw border with correct angles. ry = 0; for (i = 0; i < self.rows.length + 1; i++) { + if (!lines[yi + ry]) break; rx = 0; self._maxes.forEach(function(max, i) { rx += max; @@ -7211,6 +7213,7 @@ Table.prototype.render = function() { // Draw internal borders. for (ry = 1; ry < self.rows.length * 2; ry++) { + if (!lines[yi + ry]) break; rx = 0; self._maxes.slice(0, -1).forEach(function(max, i) { rx += max; @@ -7445,6 +7448,7 @@ ListTable.prototype.render = function() { // Draw border with correct angles. ry = 0; for (i = 0; i < height + 1; i++) { + if (!lines[yi + ry]) break; rx = 0; self._maxes.slice(0, -1).forEach(function(max, i) { rx += max; @@ -7467,6 +7471,7 @@ ListTable.prototype.render = function() { // Draw internal borders. for (ry = 1; ry < height; ry++) { + if (!lines[yi + ry]) break; rx = 0; self._maxes.slice(0, -1).forEach(function(max, i) { rx += max;