readline: change char to ch to avoid reserved word

This commit is contained in:
Kyle Robinson Young 2012-04-18 12:37:54 -07:00 committed by Ben Noordhuis
parent c56d1559fc
commit 57148f54e1

View File

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