Skip to content

Commit

Permalink
Support DEL in the REPL.
Browse files Browse the repository at this point in the history
  • Loading branch information
kapouer authored and ry committed Jul 19, 2010
1 parent 02746ed commit 0fd1656
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 0fd1656

Please sign in to comment.