Skip to content

Commit

Permalink
renderer: check for parm_right_cursor before using it.
Browse files Browse the repository at this point in the history
  • Loading branch information
chjj committed Aug 11, 2015
1 parent f1d1695 commit a1ddc14
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/widgets/screen.js
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,11 @@ Screen.prototype.draw = function(start, end) {
// } else {
// out += this.tput.el();
// }
// out += this.tput.cuf(xx - x);
// if (this.tput.strings.parm_right_cursor) {
// out += this.tput.cuf(xx - x);
// } else {
// out += this.tput.cup(y, xx);
// }
// this.fillRegion(data, ' ',
// x, this.tput.strings.erase_chars ? xx : line.length,
// y, y + 1);
Expand Down Expand Up @@ -1201,9 +1205,13 @@ Screen.prototype.draw = function(start, end) {
}
continue;
} else if (lx !== -1) {
out += y === ly
? this.tput.cuf(x - lx)
: this.tput.cup(y, x);
if (this.tput.strings.parm_right_cursor) {
out += y === ly
? this.tput.cuf(x - lx)
: this.tput.cup(y, x);
} else {
out += this.tput.cup(y, x);
}
lx = -1, ly = -1;
}
o[x][0] = data;
Expand Down

0 comments on commit a1ddc14

Please sign in to comment.