You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
readline: splitted escape sequences are processed incorrectly #1403
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:
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.
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?
Maybe there's a easier way than setting up a LXC container to reproduce?
You can press ESC, [ and D. In io.js repl it would be three separate keys, but in bash and other shells it would be one escape sequence representing left arrow. That's an easy way.
Activity
silverwind commentedon Apr 12, 2015
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.
piscisaureus commentedon Apr 12, 2015
There isn't a trivial fix for this, but generally speaking we'd need to turn this into a streaming parser.
silverwind commentedon Apr 13, 2015
Any suitable userland parsers wo could borrow from?
silverwind commentedon May 2, 2015
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?
readline: turn emitKeys into a streaming parser
rlidwka commentedon May 3, 2015
You can press
ESC,[andD. In io.js repl it would be three separate keys, but in bash and other shells it would be one escape sequence representing left arrow. That's an easy way.I'm trying to fix it in #1601
readline: turn emitKeys into a streaming parser
readline: turn emitKeys into a streaming parser
silverwind commentedon May 10, 2015
Fixed by aed6bce
readline: turn emitKeys into a streaming parser