Support for HOME and END in REPL.
This commit is contained in:
parent
6fdb874e2e
commit
66deea10c7
@ -251,6 +251,12 @@ Interface.prototype._ttyWrite = function (b) {
|
|||||||
this.cursor++;
|
this.cursor++;
|
||||||
this.output.write('\x1b[0C');
|
this.output.write('\x1b[0C');
|
||||||
}
|
}
|
||||||
|
} else if (b[1] === 91 && b[2] === 72) { // home
|
||||||
|
this.cursor = 0;
|
||||||
|
this._refreshLine();
|
||||||
|
} else if (b[1] === 91 && b[2] === 70) { // end
|
||||||
|
this.cursor = this.line.length;
|
||||||
|
this._refreshLine();
|
||||||
} else if (b[1] === 91 && b[2] === 65) { // up arrow
|
} else if (b[1] === 91 && b[2] === 65) { // up arrow
|
||||||
this._historyPrev();
|
this._historyPrev();
|
||||||
} else if (b[1] === 91 && b[2] === 66) { // down arrow
|
} else if (b[1] === 91 && b[2] === 66) { // down arrow
|
||||||
|
Loading…
x
Reference in New Issue
Block a user