-
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
The cls command doesn't clear the terminal (Windows 10 1903, ConPTY) #72708
Comments
I just tested this with both cmd and PS on Windows and |
This is my windows 10 pro version 1903 iso download linked2k://%7Cfile%7Ccn_windows_10_consumer_editions_version_1903_x64_dvd_8f05241d.iso%7C4905476096%7CF28FDC23DA34D55BA466BFD6E91DD311%7C/and language is Simplified Chinese |
I can reproduce it, it happens sometimes on shells using ConPTY. Needs more investigation as to why. Comparing good/bad logs using this is where I would start if anyone wants to take a stab at this one. |
Also happens for me. I've tried different shells (cmd, powershell, git bash) all on windows, as well as different renderers (canvas and dom for each). Doesn't appear to affect my linux machine though. Edit: Turns out this was related to #33730 for me. I was launching vscode from git bash, which is known to cause the vscode terminal not to clear correctly. When launching via any other method it appears to work correctly. |
Thank you @Tyriar for the tremendous progress on Conpty! I can also confirm this bug with both git-bash and wsl bash terminals on my Windows 1903. It happens in my environment EVERYTIME. Anything that we can do to help tackling this problem? |
@starship863 first step is to validate that ConPTY is indeed sending the wrong data by investigating logs of when it works and when it doesn't using the https://github.com/Microsoft/vscode/wiki/Terminal-Issues#enabling-escape-sequence-logging, if ConPTY is in the wrong we should them move this issue up to https://github.com/Microsoft/console. We should validate here first though as I don't want to waste their time. |
I found the bug, the terminal isn't flagging lines to be re-rendered again after erasing characters. It's only showing itself when conpty is on because it uses this particular escape sequence (CSI Ps X) to clears out cells. |
Hurrah! |
Upstream: xtermjs/xterm.js#2148 |
Fixed in #74858 |
vscode 1.35 stable and insiders 1.36 - "workbench.action.terminal.clear" command clears the terminal but if you switch and come back to you get the same stuff like before... |
@tipleavalentin that's a different issue because of how conpty works, see #75141 |
@Morgy93 same issue I have on 1.35.1. Also 1.36 insider doesn't clear after I switch terminal tabs. |
@tipleavalentin what do you mean clear after switching terminal tabs? It's not meant to clear then? |
@Tyriar Here's a video I made: https://youtu.be/HsQ2GS_hbjw |
The command I run was: workbench.action.terminal.clear |
The issue is present in the latest insider version, so no fix was done for this. I run Windows 10 x64 1903 18362.175 with git bash 2.22.0.windows.1. |
@tipleavalentin that's this issue #75141 |
Issue Type: Bug
I update my windows 10 to 1903 today.
The terminal will show
Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。
尝试新的跨平台 PowerShell https://aka.ms/pscore6
when I open the terminal.
some message is useless,so I want to clear it,and I find the bug when I enter cls
and please delete that"尝试新的跨平台 PowerShell https://aka.ms/pscore6"
VS Code version: Code 1.33.1 (51b0b28, 2019-04-11T08:27:14.102Z)
OS version: Windows_NT x64 10.0.18362
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: