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

Clear-Host command scrolls instead of clearing history #551

Closed
daleecc opened this Issue Mar 15, 2017 · 13 comments

Comments

Projects
None yet
7 participants
@daleecc

daleecc commented Mar 15, 2017

System Details

  • Operating system name and version: Windows 7 (64-bit)
  • VS Code version: 1.10.2
  • PowerShell extension version: 0.10.0
  • Output from $PSVersionTable:
Name                           Value
----                           -----
PSVersion                      5.0.10586.117
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.117
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

When executing the clear command, the action is to scroll to the top of the terminal rather than clearing the previous output.

After the next command executed, it can be difficult to find the beginning of the output as Ctrl+Home goes to the beginning of the session, not the last clear.

@daviwil daviwil added the Issue-Bug label Mar 15, 2017

@daviwil daviwil modified the milestones: 0.10.1, 0.10.2 Mar 15, 2017

@daviwil daviwil modified the milestones: 0.12.0, 0.10.2, Next Patch Update Mar 23, 2017

@daviwil daviwil modified the milestones: Next Patch Update, Next Feature Update Apr 6, 2017

@daviwil daviwil modified the milestones: April 2017, May 2017 May 8, 2017

@daviwil daviwil changed the title from Clear command scrolls instead of clearing history to Clear-Host command scrolls instead of clearing history May 24, 2017

@daviwil daviwil modified the milestones: 1.2.0, May 2017, 1.3.0 May 24, 2017

@daviwil daviwil modified the milestones: 1.3.0, June 2017 Jun 1, 2017

@daviwil daviwil modified the milestones: June 2017, 1.3.0 Jun 1, 2017

@daviwil

This comment has been minimized.

Collaborator

daviwil commented Jun 2, 2017

This issue on the VS Code repo discusses the limitation in the integrated terminal: xtermjs/xterm.js#106

@daviwil daviwil added the vscode-bug label Jun 2, 2017

@daviwil daviwil modified the milestones: 1.4.1, June 2017 Jun 22, 2017

@daviwil

This comment has been minimized.

Collaborator

daviwil commented Jun 22, 2017

Ok, I have come up with a way to fix this. VS Code provides a command called workbench.action.terminal.clear which clears the terminal output correctly. I just need to wire up Clear-Host command so that it ultimately invokes that command in VS Code. Will get this fixed for the next release!

@daviwil daviwil modified the milestones: 1.4.2, 1.5.1 Aug 24, 2017

@CookieCrumbles

This comment has been minimized.

CookieCrumbles commented Sep 7, 2017

Is the fix implemented in the latest Insiders update? I'm still having this issue. Currently working on a scraping project and this makes me rotate back to ISE :'(

@CookieCrumbles

This comment has been minimized.

CookieCrumbles commented Sep 14, 2017

Every update of the Insiders version i hope to see this fixed, no joy so far :'-(

@D3MaxT

This comment has been minimized.

D3MaxT commented Sep 27, 2017

I would love to see this fix implemented in the next release as well! With this fixed and the #region support coming in the next VSCode release, I can finally switch to VSCode full time for PowerShell!

Thank you for the hard work!

@daviwil

This comment has been minimized.

Collaborator

daviwil commented Sep 27, 2017

This is a bug in VS Code unfortunately. To verify, start a new VS Code Integrated Terminal with powershell.exe, run Get-Process and then Clear-Host, observe that the screen clearing behavior is exactly the same as in the PowerShell extension's Integrated Console.

I'll have to discuss this with the VS Code team to get it resolved since there's nothing that can be done from within the PowerShell extension to fix it.

@daviwil daviwil added the vscode-bug label Sep 27, 2017

@D3MaxT

This comment has been minimized.

D3MaxT commented Sep 28, 2017

Ah, I thought I read earlier that you had a fix for this. No worries. Hopefully there is an open issue for this in their repo.

Thank you for all your hard work!

@CookieCrumbles

This comment has been minimized.

CookieCrumbles commented Oct 2, 2017

So i suppose this means that there is no ETA on this issue? Is there any other issue i can track ?

@CookieCrumbles

This comment has been minimized.

CookieCrumbles commented Oct 24, 2017

Hi, is there any way to track if this is being handled? This is the last deal-breaking bug for me.
I'd like to move over to VSCode but can't because of this bug :-|

@daviwil daviwil modified the milestones: 1.5.1, Future Oct 26, 2017

@CookieCrumbles

This comment has been minimized.

CookieCrumbles commented Nov 16, 2017

@daviwil Hi David, i'm sorry to keep going on about this. But i just had a hard time again with big chunks of data because of the host not clearing. Is there any ETA on this? Is this being look at at this moment?
I really wish they fixed it, then i could leave behind the ISE once and for all.

@dragonwolf83

This comment has been minimized.

dragonwolf83 commented Nov 18, 2017

@CookieCrumbles please go upvote on xtermjs/xterm.js#106. This is an upstream issue that has to be fixed in VS Code's terminal.

As a workaround, there is a key shortcut ctrl+k that will clear the terminal completely when it has focus.

@stigjoergensen

This comment has been minimized.

stigjoergensen commented Mar 19, 2018

Cant it be implemented as a Ctrl+k type of work-around until its fixed?

@rkeithhill

This comment has been minimized.

Collaborator

rkeithhill commented Mar 20, 2018

This is an issue with VSCode as it is the same with the vanilla PowerShell terminal as well as CMD. Please vote up this issue - Microsoft/vscode#30638

@rkeithhill rkeithhill closed this Mar 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment