Certain escape sequences in quick succession break rendering.
See original GitHub issueDetails
- Browser and browser version: Chrome Latest
- OS version: Linux
- xterm.js version: 3.13.2
Steps to reproduce
If you take the following escape sequences and run them in a fast loop nothing is rendered in the end.
const lines = [
'\u001b\u0063',
'\u001b\u005d\u0030\u003b\u0020\u0007',
'\u001b\u005b\u0048\u001b\u005b\u0032\u004a\u001b\u005b\u0031\u003b\u0033\u0033\u006d',
'test test test',
'lalala',
];
for (let line of lines) {
this.terminal.write(line);
}
But if you make them run as a microtask it renders fine:
var inter;
inter = setInterval(
() => (lines.length ? this.terminal.write(lines.shift()) : clearInterval(inter)),
0
);
The same script that contains these escape codes is run daily with thousands of users and it displays fine using an older version of xterm.js.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Escape Sequences | Microsoft Learn
Escape sequences are typically used to specify actions such as carriage returns and tab movements on terminals and printers. They are also used ......
Read more >Using character escapes in markup and CSS - W3C
Character escapes are a way of writing a character in markup using only ASCII code points. They are useful if you are unable...
Read more >terminal/parser: determine what to do when split escape ...
Working escape sequences over multiple write operations to PTY input pipe ... the escape sequence is split up and rendered wrong.
Read more >Unable to Use Some Characters Like Backslash | Confluence
The "\" will escape the "*" the double backslash will break the line ... Confluence uses these characters to render its own content....
Read more >Rust: Beware of Escape Sequences \n | by Dominic E. - Medium
A line break is a control sequence that tells the rendering device, for example, a terminal, to move the print head down one...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jerch Good news! It definitely fixes it.
I just got home for the long weekend and I won’t have access until Tuesday. I’ll be sure to test it then. It is possible we are on an old version.
It is also possible we have the issue in production but most servers don’t output fast enough to cause the issue. Or that the users are seeing it but never reported it. Maybe they open and close the terminal until they get lucky and it works. I’ve never heard anyone mention it.