summaryrefslogtreecommitdiff
path: root/lib/readline.js
diff options
context:
space:
mode:
authorEric Schrock <Eric.Schrock@delphix.com>2013-05-20 14:44:26 -0400
committerTimothy J Fontaine <tjfontaine@gmail.com>2013-09-23 14:22:37 -0700
commit35ae69682253ea51e59610a9a9e132c78f5e71d5 (patch)
tree24a3ba7bca10164da0ececd2222336af89dc2627 /lib/readline.js
parent7c554a5cd0f1420e5017ef57252b3d3c6496cea0 (diff)
downloadnodejs-35ae69682253ea51e59610a9a9e132c78f5e71d5.tar.gz
nodejs-35ae69682253ea51e59610a9a9e132c78f5e71d5.tar.bz2
nodejs-35ae69682253ea51e59610a9a9e132c78f5e71d5.zip
readline: handle input starting with control chars
Handle control characters only when there is a single byte in the stream, otherwise fall through to the standard multibyte handling.
Diffstat (limited to 'lib/readline.js')
-rw-r--r--lib/readline.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/readline.js b/lib/readline.js
index 75e51f8d1..c52f3e88b 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -941,7 +941,7 @@ function emitKey(stream, s) {
key.name = 'space';
key.meta = (s.length === 2);
- } else if (s <= '\x1a') {
+ } else if (s.length === 1 && s <= '\x1a') {
// ctrl+letter
key.name = String.fromCharCode(s.charCodeAt(0) + 'a'.charCodeAt(0) - 1);
key.ctrl = true;