fix terminal cursor.

This commit is contained in:
Christopher Jeffrey 2015-02-12 22:37:53 -08:00
parent 33fec26984
commit 41cb97d664

View File

@ -6715,21 +6715,20 @@ Terminal.prototype.render = function() {
for (var x = xi; x < xl; x++) {
if (!line[x] || !this.term.lines[scrollback + y - yi][x - xi]) break;
line[x][0] = this.term.lines[scrollback + y - yi][x - xi][0];
if (x === cursor) {
if (this.cursor === 'line') {
line[x][0] = this.dattr;
line[x][1] = '\u2502';
continue;
} else if (this.cursor === 'underline') {
line[x][0] = this.dattr;
line[x][1] = '_';
line[x][0] = this.dattr | (2 << 18);
} else if (this.cursor === 'block' || !this.cursor) {
line[x][0] = this.dattr | (8 << 18);
line[x][1] = ' ';
}
continue;
}
line[x][0] = this.term.lines[scrollback + y - yi][x - xi][0];
line[x][1] = this.term.lines[scrollback + y - yi][x - xi][1];
// default foreground = 257
@ -6745,9 +6744,6 @@ Terminal.prototype.render = function() {
if (!((line[x][0] >> 18) & 8)) {
line[x][0] &= ~0x1ff;
line[x][0] |= this.dattr & 0x1ff;
// } else {
// line[x][0] &= ~(0x1ff << 9);
// line[x][0] |= ((this.dattr >> 9) & 0x1ff) << 9;
}
}
}