mirror of https://github.com/nodejs/node.git
Fix home/end keys in repl for putty/xterm.
parent
6078c37be5
commit
d9eb64928e
|
@ -389,12 +389,14 @@ Interface.prototype._ttyWrite = function (b) {
|
||||||
}
|
}
|
||||||
} else if ((b[1] === 91 && b[2] === 72) ||
|
} else if ((b[1] === 91 && b[2] === 72) ||
|
||||||
(b[1] === 79 && b[2] === 72) ||
|
(b[1] === 79 && b[2] === 72) ||
|
||||||
(b[1] === 91 && b[2] === 55)) { // home
|
(b[1] === 91 && b[2] === 55) ||
|
||||||
|
(b[1] === 91 && b[2] === 49 && (b[3] && b[3] === 126))) { // home
|
||||||
this.cursor = 0;
|
this.cursor = 0;
|
||||||
this._refreshLine();
|
this._refreshLine();
|
||||||
} else if ((b[1] === 91 && b[2] === 70) ||
|
} else if ((b[1] === 91 && b[2] === 70) ||
|
||||||
(b[1] === 79 && b[2] === 70) ||
|
(b[1] === 79 && b[2] === 70) ||
|
||||||
(b[1] === 91 && b[2] === 56)) { // end
|
(b[1] === 91 && b[2] === 56) ||
|
||||||
|
(b[1] === 91 && b[2] === 52 && (b[3] && b[3] === 126))) { // end
|
||||||
this.cursor = this.line.length;
|
this.cursor = this.line.length;
|
||||||
this._refreshLine();
|
this._refreshLine();
|
||||||
} else if (b[1] === 91 && b[2] === 65) { // up arrow
|
} else if (b[1] === 91 && b[2] === 65) { // up arrow
|
||||||
|
|
Loading…
Reference in New Issue