Browse Source

readline: change char to ch to avoid reserved word

v0.9.1-release
Kyle Robinson Young 13 years ago
committed by Ben Noordhuis
parent
commit
57148f54e1
  1. 8
      lib/readline.js

8
lib/readline.js

@ -839,7 +839,7 @@ var functionKeyCodeRe =
/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/;
function emitKey(stream, s) {
var char,
var ch,
key = {
name: undefined,
ctrl: false,
@ -1029,11 +1029,11 @@ function emitKey(stream, s) {
}
if (s.length === 1) {
char = s;
ch = s;
}
if (key || char) {
stream.emit('keypress', char, key);
if (key || ch) {
stream.emit('keypress', ch, key);
}
}

Loading…
Cancel
Save