readline: turn emitKeys into a streaming parser
authorAlex Kocharin <alex@kocharin.ru>
Sun, 3 May 2015 18:11:33 +0000 (18:11 +0000)
committerRoman Reiss <me@silverwind.io>
Sun, 10 May 2015 02:48:50 +0000 (04:48 +0200)
commitaed6bce9064915bda28237b1a5fbf7fcdbf439ef
tree0196f43cfb6d416c79e569d1333c20c02822d896
parent64d3210c98acf1d991a413e0993e07886c9e90de
readline: turn emitKeys into a streaming parser

In certain environments escape sequences could be splitted into
multiple chunks. For example, when user presses left arrow,
`\x1b[D` sequence could appear as two keypresses (`\x1b` + `[D`).

PR-URL: https://github.com/iojs/io.js/pull/1601
Fixes: https://github.com/iojs/io.js/issues/1403
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
.eslintrc
lib/readline.js
test/parallel/test-readline-interface.js
test/parallel/test-readline-keys.js [new file with mode: 0644]