diff --git a/lib/csi.js b/lib/csi.js
index <HASH>..<HASH> 100644
--- a/lib/csi.js
+++ b/lib/csi.js
@@ -84,7 +84,7 @@ exports.exec = function(term, data) {
 			console.log('Not implemented ' + match.cmd);
 		break;
 	case 'X': // ECH
-		term.deleteCharacter(n || 1);
+		term.eraseCharacters(n || 1);
 		break;
 	case 'Z': // CBT
 		term.mvTab(-(n || 1));
diff --git a/lib/terminal.js b/lib/terminal.js
index <HASH>..<HASH> 100644
--- a/lib/terminal.js
+++ b/lib/terminal.js
@@ -211,10 +211,14 @@ Terminal.prototype = {
 	restoreCursor: function() {
 		this.setCur(this.savedCursor);
 	},
-	deleteCharacter: function(n) {
+	deleteCharacters: function(n) {
 		var line = this.getLine().line;
 		line.splice(this.cursor.x, n || 1);
 	},
+	eraseCharacters: function(n) {
+		this.deleteCharacters(n);
+		this.insertBlanks(n);
+	},
 	setScrollRegion: function(n, m) {
 		this.scrollRegion[0] = n;
 		this.scrollRegion[1] = m;
CSI X should erase instead of delete characters.