Merge pull request #474 from Tyriar/473_refresh_null_checks
Add null checks to refresh line and character fetches
This commit is contained in:
@@ -1139,6 +1139,10 @@ Terminal.prototype.refresh = function(start, end) {
|
|||||||
row = y + this.ydisp;
|
row = y + this.ydisp;
|
||||||
|
|
||||||
line = this.lines.get(row);
|
line = this.lines.get(row);
|
||||||
|
if (!line || !this.children[y]) {
|
||||||
|
// Continue if the line is not available, this means a resize is currently in progress
|
||||||
|
continue;
|
||||||
|
}
|
||||||
out = '';
|
out = '';
|
||||||
|
|
||||||
if (this.y === y - (this.ybase - this.ydisp)
|
if (this.y === y - (this.ybase - this.ydisp)
|
||||||
@@ -1153,6 +1157,10 @@ Terminal.prototype.refresh = function(start, end) {
|
|||||||
i = 0;
|
i = 0;
|
||||||
|
|
||||||
for (; i < width; i++) {
|
for (; i < width; i++) {
|
||||||
|
if (!line[i]) {
|
||||||
|
// Continue if the character is not available, this means a resize is currently in progress
|
||||||
|
continue;
|
||||||
|
}
|
||||||
data = line[i][0];
|
data = line[i][0];
|
||||||
ch = line[i][1];
|
ch = line[i][1];
|
||||||
ch_width = line[i][2];
|
ch_width = line[i][2];
|
||||||
|
|||||||
Reference in New Issue
Block a user