fix insertmode in libterm

pull/284/head
nightwing 2016-03-22 00:10:18 +04:00
rodzic 5a4788d7e1
commit b1caa2fbf6
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -470,7 +470,7 @@ Terminal.prototype.writeInternal = function(data) {//TODO optimize lines
if (!this.insertMode)
line[this.x] = [this.curAttr, ch];
else
line[insertY].splice(this.x, 0, [this.curAttr, ch]);
line.splice(this.x, 0, [this.curAttr, ch]);
break;
case 0:
if (this.x > 0) this.x--;
@ -481,7 +481,7 @@ Terminal.prototype.writeInternal = function(data) {//TODO optimize lines
line[this.x] = [this.curAttr, ch];
line[this.x + 1] = [this.curAttr, "\x00"];
} else {
line[insertY].splice(this.x, 0, [this.curAttr, ch], [this.curAttr, ""]);
line.splice(this.x, 0, [this.curAttr, ch], [this.curAttr, ""]);
}
this.x++;
break;