Skip to content
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

$PSStyle.Progress.View = Minimal on some terminal types when there is output #3690

Closed
5 tasks done
jhoneill opened this issue Nov 11, 2021 · 7 comments
Closed
5 tasks done

Comments

@jhoneill
Copy link

Prerequisites

Steps to reproduce

On 7.2 make sure you have PSStyle.Progress.View = set to minimal.

foreach ($i in  1..100) {if ($i % 20 -eq 0) {$i} else {sleep -Milliseconds 50}  Write-Progress "Checking" -PercentComplete $i } 

On (e.g) Windows terminal this works as I would expect, Multiples of 20 are output and the progress bar shifts below them I can output more than a screenful and the progress remains below my output, all good.

In (e.g) the PowerShell integrated console in VS code the moving progress bar leaves past versions behind and obscures the output

Expected behavior

See Screen shot 1

Actual behavior

See screen shot 2

Error details

n/a

Environment data

PSVersion                      7.2.0
PSEdition                      Core
GitCommitId                    7.2.0
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

1 After working correctly

image

2 Failing

image

@daxian-dbw
Copy link
Member

@andschwa Can you please take a look and see if this should be transferred to PSES repo?

@jhoneill
Copy link
Author

@daxian-dbw I'm starting to wonder if it is a PSES issue with things that move the cursor, rather than an issue with the the cursor movements that PSStyle is calling for.
If others come back and say "It happens in this host too" it needs to stay here; if not I can close this and open a fresh issue in PSES if that's more help ?

@daxian-dbw
Copy link
Member

daxian-dbw commented Nov 12, 2021

I observe different but equally disturbing behavior by running your repro script in the VSCode integrated console (PSES 2021.11.0). As is shown below, the last progress bar lingers around and prompt is not working well afterwards. Even cls doesn't work properly to clear the screen.

The same works fine in the default PowerShell terminal (not the integrated console comes with PSES).

Animation

@SteveL-MSFT SteveL-MSFT transferred this issue from PowerShell/PowerShell Nov 15, 2021
@ghost ghost added the Needs: Triage Maintainer attention needed! label Nov 15, 2021
@SeeminglyScience
Copy link
Collaborator

Unsure if the original problem is related, but what @daxian-dbw describes is due to a missing piece in the host impl described here.

@StevenBucher98 StevenBucher98 added Issue-Bug A bug to squash. Area-Extension Terminal Area-PSReadLine and removed Needs: Triage Maintainer attention needed! labels Nov 16, 2021
@StevenBucher98 StevenBucher98 added this to the Consider-vNext milestone Nov 16, 2021
@SydneyhSmith
Copy link
Collaborator

@jhoneill is this issue fixed in our latest release?

@SydneyhSmith SydneyhSmith added the Needs: Author Feedback Please give us the requested feedback! label May 9, 2022
@jhoneill
Copy link
Author

jhoneill commented May 9, 2022

@SydneyhSmith Yes ! :-)

I'll close the issue

@jhoneill jhoneill closed this as completed May 9, 2022
@ghost ghost added Needs: Maintainer Attention Maintainer attention needed! and removed Needs: Author Feedback Please give us the requested feedback! labels May 9, 2022
@ghost ghost reopened this May 9, 2022
@andyleejordan andyleejordan added Resolution-Fixed Will close automatically. and removed Needs: Maintainer Attention Maintainer attention needed! labels May 10, 2022
@andyleejordan
Copy link
Member

Awesome news, thanks @jhoneill!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants