question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sending `\u001Bc` escape sequence clears scrollback buffer

See original GitHub issue

Details

  • Browser and browser version: Google Chrome | 90.0.4430.93 (Official Build) (x86_64)
  • OS version: macOS Big Sur
  • xterm.js version: 4.9.0

Steps to reproduce

  1. Use a regular macOS Terminal (or iTerm if you prefer) and execute ls a couple of times and then execute printf '\u001Bc'. You will notice that the scrollback buffer is not cleared.
  2. Open Visual Studio Code and do the same thing, you will now notice that the scrollback buffer is cleared.

I noticed the difference in behaviour because I was using ansi-escapes#clearscreen which shouldn’t clear the buffer but it does in xterm.js.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
SamVerschuerencommented, May 6, 2021

Created an issue for this 🔝

Thanks for all the information. Really love the hard work you guys put into this 🙏 .

1reaction
SamVerschuerencommented, May 5, 2021

Already checking this with @sindresorhus and @Qix-. Thanks for creating the issue and for the feedback @jerch @Tyriar!

Read more comments on GitHub >

github_iconTop Results From Across the Web

The easiest way to clear scrollback buffer of terminal + some ...
And another question is how to just type such escape sequence into terminal, to perform desired action? Then do not have to think...
Read more >
Clear a terminal screen for real [closed] - Stack Overflow
Here is some more information on terminal escape codes. ... following sequence of commands to clear the screen and the scroll-back buffer.
Read more >
Terminal control/Clear the screen - Rosetta Code
Task Clear the terminal window.
Read more >
Iterm2 fully clear scrollback within ssh - terminal - Super User
To clear the scrollback buffer using escape codes, refer to this page of iTerm2 special escape ... You can send it with a...
Read more >
C clear screen cross platform - f-static.net
Clean the terminal window. ... This program uses cp/m system calls to send a form feed character to ... terminal with support for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found