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]))/; /^(?:\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);
} }
} }

Loading…
Cancel
Save