-
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
"Terminal: Clear" not working as desired #75141
Comments
(Experimental duplicate detection) |
@vivekmalhotra this is happening because Terminal: Clear tells the frontend (the thing rendering everything) to clear, but the way that the conpty backend works is it will sometimes reprint what it thinks should be visible. Since it doesn't know about our clear it reprints the unwanted output, this doesn't happen on a regular linux/mac backend that conpty is trying to emulate. @zadjii-msft is there anything that can be done here to tell conpty to not reprint the screen? I suspect python.exe does not enter alt mode so I'm not sure why a reprint is necessary. |
Hmm. That might not be a scenario that works for us right now. We might need to add an extra input sequence/signal to tell conpty to clear the buffer. I am a little curious why the whole buffer got repainted, that does seem like a bug. However, since conpty does think that all that text is still there (because its buffer wasn't cleared, only the frontend buffer was), it might get more confused by not repainting the entire thing. |
@zadjii-msft might be better to fix the bug if there is one, rather than add an explicit manually clear the buffer sequence that only works on conpty. |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
@zadjii-msft @Tyriar |
This is a bug that's external to VsCode. It'll be fixed by work on the ConPTY API that'll be tracked by microsoft/terminal#1193. |
Thanks for the reply, Mike |
@vivekmalhotra the bot closed it because of the needs more info label, reopened. |
Terminal clearI run npm in terminal,then end it with "Ctrl + C" , useing code clear and get result as left(I have click enter several times),useing "ctrl + shift + p" and "terminal clear" get result as right,it clear all and terminal crashed. terminal will back to line 1 and enterable but not clear character。 用了clear命令后,terminal返回第一行并且可编辑,但是并没有清理界面字符,使用 控制中心的Terminal clear 指令后可以清理,但是terminal崩溃了 |
So who should be fixing the issue now? VS Code here or Windows Terminal? 😢 Any workaround at the moment? This issue is quite annoying. |
No debounce,Push 1s Enter,it still effective,more than 1s |
|
@zadjii-msft Thanks for the information. I will keep track on the related issue. |
@GearTheWorld the milestone of the issue which is the month in which the work is done. It'll get released in early July. |
Great to hear this is now fixed - thanks @Tyriar! Coincidentally, the issue got fixed on June 9th, exactly 4 years after it was first created. Time flies... 😊 |
same here |
@zadjii-msft is this behaving as expected? Does calling into the conpty clear API not reset its internal buffer cursor position to 0,0? |
VS Code, on Windows, with regular I use it frequently in the command-line when dealing with commands that spit out a lot of text or errors. Sometimes it's difficult to see where the output from one command ends and the next begins, and in those cases it's super handy to just run This doesn't work at all in VS Code currently. Running
|
@Svish this is talking about the |
I see many comments but for me it started to work weeks ago. I use gitbash in vac and "clear" works now as a charm |
Still having an issue of the terminal clearing, then it skiping lines when I start writing , same as this guy here |
Ctrl + K seems work for me instead of typing clear in terminal. |
Closing this as it was fixed on our end with #184734, you may not get the fix until a future Windows update unfortunately |
@Tyriar This answer doesn't help us, anyway to force update? which package from windows need to be updated? Update: I think this way it's working https://github.com/microsoft/terminal/releases - Update Terminal to latest, prefer to use only Latest not Pre-release Assets > .msixbundle format and install that, that's it. It didn't work in first attempt of vscode restart, but after reset this setting both here, probably did the work, maybe it will work after pc restart also. |
@mehedihasanziku I'm not sure the version exactly but it's not a package you can install independently but Windows itself, you might be able to find the version by following links to the microsoft/terminal repo. |
Steps to Reproduce:
Does this issue occur when all extensions are disabled?:
Yes, the issue reoccurs. (Note: All except the "Python" extension were disabled. Python extension is needed to run the python file in terminal.
I had also posted in Super User forum thinking this was some issue with my system. And then I tried it on a clean build of VS code and it got repeated. Hence, I decided to post it as a bug.
Link to Super User forum question
VS Code version: Code - Insiders 1.36.0-insider (c089daa, 2019-06-07T05:19:15.188Z)
OS version: Windows_NT x64 10.0.18362
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Extensions (1)
The text was updated successfully, but these errors were encountered: