readline: change char to ch to avoid reserved word
This commit is contained in:
parent
c56d1559fc
commit
57148f54e1
@ -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…
x
Reference in New Issue
Block a user