Skip to content

Conversation

daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented Oct 21, 2021

PR Summary

Fix #1888

Reset all attributes before changing color in rendering. Otherwise, the effects from the previous color sequence may leak to the subsequent text.

Before the fix, the Faint (decreased intensity) effect for command name token leaks to other tokens:
image

After the fix, the Faint effect for command name token doesn't leak:
image

PR Checklist

  • PR has a meaningful title
    • Use the present tense and imperative mood when describing your changes
  • Summarized changes
  • Make sure you've added one or more new tests
  • Make sure you've tested these changes in terminals that PowerShell is commonly used in (i.e. conhost.exe, Windows Terminal, Visual Studio Code Integrated Terminal, etc.)
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed at PowerShell-Docs
      • Doc Issue filed:
Microsoft Reviewers: Open in CodeFlow

@daxian-dbw daxian-dbw merged commit 7edfa93 into PowerShell:master Oct 21, 2021
@daxian-dbw daxian-dbw deleted the colorleak branch October 21, 2021 00:48
@ghost
Copy link

ghost commented Oct 28, 2021

🎉 v2.2.0-beta4 has been released which incorporates this pull request. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

faint color attribute "leaks" to the whole command line
1 participant