Skip to content
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

screem.display not correct when feed data has many '\x1b[C' chars #129

Open
JJJJJJJJames opened this issue Oct 10, 2019 · 2 comments
Open

Comments

@JJJJJJJJames
Copy link

First type some short command, then type a long command, then use up and down or page up and page down key, server will send back stream characters with many '\x1b[C' chars, feed those data and call screen.display, the result is not correct.

@superbobry
Copy link
Collaborator

Could you provide a reproducer please? Are you driving the Screen manually or from a pty?

@JJJJJJJJames
Copy link
Author

From pty.

I have below output, use debug screen,last command is ["draw", ["eeeeee"], {}], but when I print the screen.display, the result is cccccccccccccccccccccccccccccccceeeeee

output:
'eeeeee\x08\x08\x08\x08\x08\x08qqqqqqqq\x08\x08\x08\x08\x08\x08\x08\x08\x1b[2Peeeeee\x08\x08\x08\x08\x08\x08ccccccc\x08\x08\x08\x08\x08\x08\x08aaaaaaa\x08\x08\x08\x08\x08\x08\x08ccccccccccccccccccccccccccccccccccccccccccc\r\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[Ceeeeeeeeeee\x1b[K\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x1b[2Pddddddddd\x08\x08\x08\x08\x08\x08\x08\x08\x08ccccccccccc\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x1b[2Pddddddddd\x08\x08\x08\x08\x08\x08\x08\x08\x08eeeeeeeeeee\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08\x08ccccccccccccccccccccccccccccccccccccccccccc\r\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[C\x1b[Caaaaaaa\x1b[K\x08\x08\x08\x08\x08\x08\x08ccccccc\x08\x08\x08\x08\x08\x08\x08\x1b[1Peeeeee'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants