diff --git a/plugins/c9.ide.editors/tabmanager.js b/plugins/c9.ide.editors/tabmanager.js index ade10e4b..1db406f2 100644 --- a/plugins/c9.ide.editors/tabmanager.js +++ b/plugins/c9.ide.editors/tabmanager.js @@ -131,7 +131,11 @@ define(function(require, module, exports) { function removeTab(e) { if (!e.error) { var tab = findTab(e.path); - tab && tab.unload(); + if (tab) { + tab.document.meta.$ignoreSave = true; + tab.close(); + delete tab.document.meta.$ignoreSave; + } } } fs.on("afterUnlink", removeTab); diff --git a/plugins/c9.ide.terminal/aceterm/aceterm.js b/plugins/c9.ide.terminal/aceterm/aceterm.js index 8462648c..368a7027 100644 --- a/plugins/c9.ide.terminal/aceterm/aceterm.js +++ b/plugins/c9.ide.terminal/aceterm/aceterm.js @@ -113,8 +113,11 @@ define(function(require, exports, module) { for (var l = Math.min(line.length, term.cols); l--;) if (line[l][1]) break; - for (var i = 0; i <= l; i++) - str += line[i][1] || " "; + for (var i = 0; i <= l; i++) { + var ch = line[i][1]; + if (ch != "\x00") + str += line[i][1] || " "; + } if (newLineChar && !line.wrapped) str += newLineChar; @@ -546,7 +549,7 @@ define(function(require, exports, module) { if (ch <= ' ') - out += '\xa0'; + out += ch == "\x00" ? "" : "\xa0"; else if (ch == '&') out += '&'; else if (ch == '<') diff --git a/plugins/c9.ide.terminal/aceterm/libterm.js b/plugins/c9.ide.terminal/aceterm/libterm.js index 1e1072d6..98a28b5d 100644 --- a/plugins/c9.ide.terminal/aceterm/libterm.js +++ b/plugins/c9.ide.terminal/aceterm/libterm.js @@ -458,6 +458,11 @@ Terminal.prototype.writeInternal = function(data) {//TODO optimize lines var width = ch > "\x7f" ? wc.charWidth(ch.charCodeAt(0)) : 1; line = lines[insertY]; + var x = this.x; + while (line[x] && !line[x][1] && x > 0) { + line[x] = [line[x][0], " "]; + x--; + } switch (width) { case 1: if (!this.insertMode) @@ -472,7 +477,7 @@ Terminal.prototype.writeInternal = function(data) {//TODO optimize lines case 2: if (!this.insertMode) { line[this.x] = [this.curAttr, ch]; - line[this.x + 1] = [this.curAttr, ""]; + line[this.x + 1] = [this.curAttr, "\x00"]; } else { line[insertY].splice(this.x, 0, [this.curAttr, ch], [this.curAttr, ""]); } @@ -700,6 +705,9 @@ Terminal.prototype.writeInternal = function(data) {//TODO optimize lines // change log file break; case 50: + var args = this.params[1].match(/CursorShape=(.)/i); + var shape = ['BLOCK', 'BEAM', 'UNDERLINE'][parseInt(args && args[1]) || 0]; + // TODO cursor shape // dynamic font break; case 51: