Skip to content

Commit 7588b13

Browse files
committed
allignment issue fix
1 parent cd33a09 commit 7588b13

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/LCT.Common/Logging/LoggerHelper.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,9 @@ private static int GetAutoConsoleWidth()
4949

5050
try
5151
{
52-
if (Console.IsOutputRedirected)
53-
return 120;
54-
55-
int width = Console.WindowWidth;
56-
57-
if (width <= 0) return 160;
58-
if (width < 100) return 160;
59-
if (width > 240) return 240;
52+
int width = Console.IsOutputRedirected ? 160 : Console.WindowWidth;
53+
if (width < 100) width = 160;
54+
if (width > 240) width = 240;
6055
return width;
6156
}
6257
catch (InvalidOperationException ex)

0 commit comments

Comments
 (0)