File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
projects/examples/wcf/Test Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ static int Percent(int a, params int[] values)
140
140
141
141
static void WriteWholeLine ( )
142
142
{
143
- int i = Console . WindowWidth ;
143
+ int i = ConsoleWidth ( ) ;
144
144
while ( i > 1 )
145
145
{
146
146
Console . Write ( " " ) ;
@@ -157,7 +157,7 @@ static void WriteWholeLine(string format, params object[] args)
157
157
static void WriteWholeLine ( string o )
158
158
{
159
159
Console . Write ( o ) ;
160
- int i = Console . WindowWidth ;
160
+ int i = ConsoleWidth ( ) ;
161
161
while ( i > o . Length + 1 )
162
162
{
163
163
Console . Write ( " " ) ;
@@ -166,5 +166,10 @@ static void WriteWholeLine(string o)
166
166
Console . Write ( "\n " ) ;
167
167
168
168
}
169
+
170
+ static int ConsoleWidth ( )
171
+ {
172
+ return Environment . GetEnvironmentVariable ( "TERM" ) == null ? Console . WindowWidth : 80 ;
173
+ }
169
174
}
170
175
}
You can’t perform that action at this time.
0 commit comments