PowerShell / PowerShell/vscode-powershell
Text colors in editor sometimes randomly change when scrolling
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
Issue Description
When editing code in an editor window, on very rare occasions, the text coloring that is based on the code content type will randomly change as you scroll down the page. To demonstrate the effect I created a bunch of comment lines between my code.

Other notes:
The Minimap shows the same coloring. There also appears to be 'ghost' characters in it.
The formatting is preserved if copied and pasted into another program, a new message in Outlook for example.
Closing and re-opening VSC fixes the issue.
Another person reported the same issue before and it was closed and suggested to be moved here: https://github.com/microsoft/vscode/issues/120800
Environment Information
Visual Studio Code
| Name | Version |
|---|---|
| Operating System | Windows_NT x64 10.0.19042 |
| VSCode | 1.55.2 |
| PowerShell Extension Version | 2021.2.2 |
PowerShell Information
| Name | Value |
|---|---|
| PSVersion | 5.1.19041.906 |
| PSEdition | Desktop |
| PSCompatibleVersions | 1.0 2.0 3.0 4.0 5.0 5.1.19041.906 |
| BuildVersion | 10.0.19041.906 |
| CLRVersion | 4.0.30319.42000 |
| WSManStackVersion | 3.0 |
| PSRemotingProtocolVersion | 2.3 |
| SerializationVersion | 1.1.0.1 |
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
| Extension | Author | Version |
|---|---|---|
| azurerm-vscode-tools | msazurermtools | 0.15.0 |
| Bookmarks | alefragnani | 13.0.4 |
| powershell | ms-vscode | 2021.2.2 |
| vscode-dotnet-runtime | ms-dotnettools | 1.0.0 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in Visual Studio Code 1.55.2 on Windows with the PowerShell extension, scrolling through a file containing many comment lines. Investigate the editor's syntax coloring and minimap behavior; done means scrolling no longer changes text colors or produces ghost characters, while copied content remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100