Browse Source

fix home/end on GNU/Linux

v0.7.4-release
Johan Euphrosine 15 years ago
committed by Ryan Dahl
parent
commit
0e1e00e68b
  1. 4
      lib/readline.js

4
lib/readline.js

@ -361,10 +361,10 @@ Interface.prototype._ttyWrite = function (b) {
this.cursor++;
this.output.write('\x1b[0C');
}
} else if (b[1] === 91 && b[2] === 72) { // home
} else if ((b[1] === 91 || b[1] === 79) && b[2] === 72) { // home
this.cursor = 0;
this._refreshLine();
} else if (b[1] === 91 && b[2] === 70) { // end
} else if ((b[1] === 91 || b[1] === 79) && b[2] === 70) { // end
this.cursor = this.line.length;
this._refreshLine();
} else if (b[1] === 91 && b[2] === 65) { // up arrow

Loading…
Cancel
Save