Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/CommandLine/ParserSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ public ParserSettings()
try
{
maximumDisplayWidth = Console.WindowWidth;
if (maximumDisplayWidth < 1)
{
maximumDisplayWidth = DefaultMaximumLength;
}
}
catch (IOException)
{
Expand Down
4 changes: 4 additions & 0 deletions src/CommandLine/Text/HelpText.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ public HelpText(SentenceBuilder sentenceBuilder, string heading, string copyrigh
try
{
maximumDisplayWidth = Console.WindowWidth;
if (maximumDisplayWidth < 1)
{
maximumDisplayWidth = DefaultMaximumLength;
}
}
catch (IOException)
{
Expand Down