FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix ConciseView where error message is wider than window width and doesn't have whitespace by SteveL-MSFT · Pull Request #11880 · PowerShell/PowerShell · GitHub

Fix ConciseView where error message is wider than window width and doesn't have whitespace - #11880

Merged
Ilya (iSazonov) merged 4 commits into
PowerShell:masterfrom
SteveL-MSFT:errorview-width
Feb 20, 2020
Merged

Fix ConciseView where error message is wider than window width and doesn't have whitespace#11880
Ilya (iSazonov) merged 4 commits into
PowerShell:masterfrom
SteveL-MSFT:errorview-width

Conversation

Steve Lee (SteveL-MSFT) commented Feb 18, 2020
edited
Loading

Copy link
Copy Markdown
Member

PR Summary

This is a bit of an edge case. Where the error message is wider than the console window width and doesn't contain whitespace, then it doesn't get rendered as the calculation to split the string uses a negative index. Fix is to check that the string length subtracting the prefix length is greater than 0 before getting a substring, otherwise, just use it.

PR Context

#11827

PR Checklist

Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Feb 19, 2020
Ilya (iSazonov) added this to the 7.1.0-preview.1 milestone Feb 19, 2020

Copy link
Copy Markdown
Member Author

PoshChan-Bot (@PoshChan) please retry linux, windows

Copy link
Copy Markdown
Collaborator

Steve Lee (@SteveL-MSFT), successfully started retry of PowerShell-CI-Linux, PowerShell-CI-Windows

Copy link
Copy Markdown

🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Steve Lee (SteveL-MSFT) deleted the errorview-width branch June 6, 2020 02:30
John Dennis (silijon) pushed a commit to SkyKick/PowerShell that referenced this pull request Jul 2, 2020
…esn't have whitespace (PowerShell#11880)

# Conflicts:
#	src/System.Management.Automation/FormatAndOutput/DefaultFormatters/PowerShellCore_format_ps1xml.cs
#	test/powershell/engine/Formatting/ErrorView.Tests.ps1
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL