kopia lustrzana https://github.com/c9/core
fix insertmode in libterm
rodzic
5a4788d7e1
commit
b1caa2fbf6
|
@ -470,7 +470,7 @@ Terminal.prototype.writeInternal = function(data) {//TODO optimize lines
|
||||||
if (!this.insertMode)
|
if (!this.insertMode)
|
||||||
line[this.x] = [this.curAttr, ch];
|
line[this.x] = [this.curAttr, ch];
|
||||||
else
|
else
|
||||||
line[insertY].splice(this.x, 0, [this.curAttr, ch]);
|
line.splice(this.x, 0, [this.curAttr, ch]);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
if (this.x > 0) this.x--;
|
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] = [this.curAttr, ch];
|
||||||
line[this.x + 1] = [this.curAttr, "\x00"];
|
line[this.x + 1] = [this.curAttr, "\x00"];
|
||||||
} else {
|
} else {
|
||||||
line[insertY].splice(this.x, 0, [this.curAttr, ch], [this.curAttr, ""]);
|
line.splice(this.x, 0, [this.curAttr, ch], [this.curAttr, ""]);
|
||||||
}
|
}
|
||||||
this.x++;
|
this.x++;
|
||||||
break;
|
break;
|
||||||
|
|
Ładowanie…
Reference in New Issue