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

Sticky Scroll showing a maximum of one line #5163

Open
5 of 6 tasks
arodir opened this issue Mar 24, 2025 · 4 comments
Open
5 of 6 tasks

Sticky Scroll showing a maximum of one line #5163

arodir opened this issue Mar 24, 2025 · 4 comments
Labels
Area-Folding Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs.

Comments

@arodir
Copy link

arodir commented Mar 24, 2025

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

Sticky Scroll is limited to one line once the PowerShell extension's terminal is loaded. This is reproducable. Sticky Scroll is displaying multiple lines before the terminal has finished loading. This occurs in both 2025.3.0 and 2025.0.0 versions (and earlier, I don't remember it working before).
This is on a fresh install of VS Code and the extension, no settings have been changed.

PowerShell Version

Name                           Value
----                           -----
PSVersion                      5.1.26100.2161
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.2161
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Name             : Visual Studio Code Host
Version          : 2025.3.0
InstanceId       : 6c283390-824b-4ec7-ad77-279d279a380b
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : de-DE
CurrentUICulture : de-DE
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

1.98.2
ddc367ed5c8936efe395cffeec279b04ffd7db78
x64

Extension Version

ms-vscode.powershell@2025.3.0

Steps to Reproduce

  • start a fresh install of VS Code
  • open a PowerShell file
  • see Sticky Scroll display multiple lines at the top
  • install PowerShell extension
  • see Sticky Scroll collapse to one line only after the terminal has finished loading

Visuals

Image

Logs

No response

@arodir arodir added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Mar 24, 2025
@JustinGrote
Copy link
Collaborator

JustinGrote commented Mar 24, 2025

Thank you for reporting!

Do you have Semantic Highlighting enabled?

The PowerShell language in vscode is a little unique in that it has a default textmate grammar that is built into vscode, even without having the PS extension installed. Once it loads, if you have semantic highlighting loaded, it might change the symbol state here.

@arodir
Copy link
Author

arodir commented Mar 26, 2025

Semantic Highlighting was enabled, but disabling it does not change anything in regards to Sticky Scroll.

Edit:

Workaround (or solution?): Changing the Sticky Scroll: Default Model from its default of outlineModel to foldingProviderModel makes Sticky Scroll work.

settings.json:

{
    "[powershell]": {
        "editor.stickyScroll.defaultModel": "foldingProviderModel"
    }
}

@JustinGrote
Copy link
Collaborator

Interesting, thanks for the further investigation! I'm not aware of the effect of the sticky scroll models so will need to determine if this is expected behavior or not.

@JustinGrote JustinGrote added Area-Folding and removed Needs: Triage Maintainer attention needed! labels Mar 26, 2025
@JustinGrote
Copy link
Collaborator

JustinGrote commented Mar 26, 2025

So after investigation, foldingProviderModel is what you want, because our LSP provides that folding information. The outline information model goes by symbols in the outline view on the right, so if the header you want is not provided by the outline provider, it won't show up there.

THe setting is interesting because the default says outline provider is preferred, and only uses folding if outline is not avaliable, but there is no "outline provider" specifically in the LSP spec, just the symbols provider, so need to investigate more about how these interact.

There is probably some tightening/alignment we can do to ensure the foldingProvider has the information from the outlineProvider so they are consistent, so that folding candidates are at least visible in the outline at a high level.

@JustinGrote JustinGrote added the Up for Grabs Will shepherd PRs. label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Folding Issue-Bug A bug to squash. Up for Grabs Will shepherd PRs.
Projects
None yet
Development

No branches or pull requests

2 participants