-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readline: splitted escape sequences are processed incorrectly #1403
Comments
I have this too on one of my Windows machines while beeing ssh'ed into a RedHat box. Curiously, it doesn't happen on any other scenarios for me, but if it does, it hugely annoying to work the repl with that bug. |
There isn't a trivial fix for this, but generally speaking we'd need to turn this into a streaming parser. |
Any suitable userland parsers wo could borrow from? |
For some reason I fail to reproduce this on the one machine that was affected by this. Maybe there's a easier way than setting up a LXC container to reproduce? |
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`). Fixes: nodejs#1403
You can press I'm trying to fix it in #1601 |
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`). Fixes: nodejs#1403
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: #1601 Fixes: #1403 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
Fixed by aed6bce |
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: nodejs#1601 Fixes: nodejs#1403 Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Roman Reiss <[email protected]>
I'm running io.js inside LXC container console (
lxc-console
) in Ubuntu 14.04 terminal.When I press and hold an arrow key, node.js sometimes receives escape sequences splitted into multiple chunks:
Here you can see
\x1b[D
(arrow left) is broken into\x1b
+[D
.Readline doesn't handle those, because it assumes that the entire escape sequence is contained within a data chunk. So it skips escape character itself, and
[D
is getting printed to the terminal:Here is a screenshot.
Trying to find a way to fix it at the moment. Any ideas?
The text was updated successfully, but these errors were encountered: