Support DEL in the REPL.

This commit is contained in:
Jérémy Lal 2010-07-19 01:12:27 +02:00 committed by Ryan Dahl
parent 02746eddd6
commit 0fd1656d63

View File

@ -255,6 +255,11 @@ Interface.prototype._ttyWrite = function (b) {
this._historyPrev();
} else if (b[1] === 91 && b[2] === 66) { // down arrow
this._historyNext();
} else if (b[1] === 91 && b[2] === 51 && this.cursor < this.line.length) { // delete right
this.line = this.line.slice(0, this.cursor)
+ this.line.slice(this.cursor+1, this.line.length)
;
this._refreshLine();
}
break;