-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
VsCode is both inconsistent and fails to work correctly in Windows for ANSI codes to reset the terminal scrollback buffers #176709
Comments
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.76.1. Please try upgrading to the latest version and checking whether this issue remains. Happy Coding! |
Same as #75141 re clearing the buffer on windows |
1.76.0 vs 1.76.1 makes no difference. That update came out a day or so ago. But, in any case, I upgraded 1.76.1 and it makes no difference in this issue. |
That issue was opened 4 years-ago...
The enhancements changes to wt.exe and many other CLI terminal tools have dramatically evolved since then for ANSI control-behavior support and tooling expectations for ANSI control-behavior support. :-) |
I've noticed this problem on my work computer running Windows 10, but I don't think it occurs on either of my home computers running Windows 11. I don't have the patience to test this thoroughly, but it might be worth investigating what the difference there is. Possibly a newer I'd also like to point out that, as far as I understand, this issue is very different from the "Terminal: Clear" command issue(s). |
This is tracked in xtermjs/xterm.js#1727 |
That issue is about the behavior of
You can print the typical ANSI escape codes for commands like Write-Host -NoNewLine "`u{1b}[H`u{1b}[2J`u{1b}[3J" This is I'm not sure exactly what role(s) |
I see, in that case it's an issue with an older version of conpty (one of the components in conhost.exe). The only fix here is to either update to Windows 11 or wait until we ship conpty with VS Code which could be some time as we're blocked on the Windows Terminal team to package it up for us to consume. |
Would it be possible to let VS Code use an alternative conpty? E.g., allow users to point VS Code at a Windows Terminal installation and have it use the version of conpty provided there. I'm unfortunately stuck on Windows 10 at work (well, I did find out that Windows will let me upgrade to 11, but I've yet to be brave enough to attempt that), and "we're blocked on the Windows Terminal team" isn't particularly helpful to end users. Is there a separate issue / milestone / something else about shipping conpty with VS Code? If not, could we reopen this issue until it's fixed? |
@qtow we want to, but we're blocked on their team. Here's the issue on their side microsoft/terminal#15065. Upgrading to 11 isn't a big issue in my experience, you can move the taskbar back to the left if that's the scary thing like it was for me. |
I understand you're blocked, I was wondering if a workaround could be introduced in the meantime. I'm not sure it would actually work, but I'm assuming conpty is statically linked into OpenConsole.exe, so maybe VS Code could open OpenConsole.exe as a library? It looks like Visual Studio 2022 (possibly only the preview version) ships a build of OpenConsole.exe with a separate conpty.dll. I'm not sure how much effort it would be, but it seems to me like VS Code could copy whatever they're doing.
It's more so the heaps of legacy software that I'm not confident will continue to work. I'm generally fond of staying as up to date as possible on everything, but I really need my work computer to function as intended. The new Outlook UI is already proving quite annoying for various reasons, and that's just an email client. |
microsoft/node-pty#490 is the issue that tracks actually embedding the conpty package once it's available. |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
'\ec\e[3J'
pain-points
Noting that keyboard actions within VsCode do work to clear the buffers on windows 「having that capability does not address the ANSI problem」
wt.exe
was embedded into the terminal view as an option.work in VsCode but do work in
wt.exe
.leave it in an inconsistent state. (which is also an frustrating pain point during development).
The text was updated successfully, but these errors were encountered: