From b1caa2fbf68f885032aed51a05ae1d489e36738b Mon Sep 17 00:00:00 2001 From: nightwing Date: Tue, 22 Mar 2016 00:10:18 +0400 Subject: [PATCH] fix insertmode in libterm --- plugins/c9.ide.terminal/aceterm/libterm.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/c9.ide.terminal/aceterm/libterm.js b/plugins/c9.ide.terminal/aceterm/libterm.js index 4f30c487..c19e8656 100644 --- a/plugins/c9.ide.terminal/aceterm/libterm.js +++ b/plugins/c9.ide.terminal/aceterm/libterm.js @@ -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;