From 57148f54e10f57a15deb51713bbe70f5f126b4dc Mon Sep 17 00:00:00 2001 From: Kyle Robinson Young Date: Wed, 18 Apr 2012 12:37:54 -0700 Subject: [PATCH] readline: change char to ch to avoid reserved word --- lib/readline.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/readline.js b/lib/readline.js index 75eb7fe08d..d69aeb4a88 100644 --- a/lib/readline.js +++ b/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); } }