Closed brianmwhite closed 6 years ago
@brianmwhite Thanks, good catch. Looks like this also affects Linux, wonder if there is a different way to expand that on both...
Maybe. This line sets a terminal window (taken from Can a Terminal window be resized with a Terminal command?) to 100x50 characters:
printf '\e[8;50;100t'
You could also keep an eye on this code in the dotnet corefx > ConsolePal.Unix.cs class to see if someone comes up with a cross platform way to handle it.
I added logic in the PadRow method to check if the runtime is windows before attempting to set the Console.WindowWidth property. Before this change, an exception would be thrown if the console width was less than the row's length. I only tested this on a Mac.