Skip to content

Conversation

@daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented May 22, 2020

PR Summary

Fix #1542
Reset all VT attributes for PromptText if it contains VT sequences.
If the text doesn't contain VT sequences, we leave it unchanged, so that when rendering we can apply the default error color as expected.

After the fix, the color doesn't leak in the formatted output:
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
  • User-facing changes
    • Not Applicable
    • OR
    • Documentation needed at PowerShell-Docs
      • Doc Issue filed:
Microsoft Reviewers: Open in CodeFlow

@daxian-dbw daxian-dbw requested a review from lzybkr May 22, 2020 00:32
@iSazonov
Copy link

Will this fix PowerShell/PowerShell#11267 too?

@daxian-dbw daxian-dbw merged commit 65d332e into PowerShell:master May 22, 2020
@daxian-dbw daxian-dbw deleted the promptText branch May 22, 2020 06:12
@daxian-dbw
Copy link
Member Author

@iSazonov No this doesn't.

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.

Formatting Get-PSReadLineOption doesn't reset colors in PromptText

3 participants