@@ -160,11 +160,11 @@ private void ReallyRender()
160
160
}
161
161
_consoleBuffer = newBuffer ;
162
162
}
163
-
163
+
164
164
for ( int i = 0 ; i < text . Length ; i ++ )
165
165
{
166
166
SavedTokenState state = null ;
167
- totalBytes = totalBytes % bufferWidth ;
167
+ totalBytes = totalBytes % bufferWidth ;
168
168
if ( ! afterLastToken )
169
169
{
170
170
// Figure out the color of the character - if it's in a token,
@@ -228,7 +228,7 @@ private void ReallyRender()
228
228
229
229
if ( text [ i ] == '\n ' )
230
230
{
231
- while ( ( j % bufferWidth ) != 0 )
231
+ while ( ( j % bufferWidth ) != 0 )
232
232
{
233
233
_consoleBuffer [ j ++ ] = _space ;
234
234
}
@@ -247,7 +247,7 @@ private void ReallyRender()
247
247
248
248
//if there is no enough space for the character at the edge, fill in spaces at the end and
249
249
//put the character to next line.
250
- int filling = totalBytes > bufferWidth ? ( totalBytes - bufferWidth ) % size : 0 ;
250
+ int filling = totalBytes > bufferWidth ? ( totalBytes - bufferWidth ) % size : 0 ;
251
251
for ( int f = 0 ; f < filling ; f ++ )
252
252
{
253
253
_consoleBuffer [ j ++ ] = _space ;
@@ -258,19 +258,19 @@ private void ReallyRender()
258
258
{
259
259
_consoleBuffer [ j ] . UnicodeChar = '^' ;
260
260
MaybeEmphasize ( ref _consoleBuffer [ j ++ ] , i , foregroundColor , backgroundColor ) ;
261
- _consoleBuffer [ j ] . UnicodeChar = ( char ) ( '@' + text [ i ] ) ;
261
+ _consoleBuffer [ j ] . UnicodeChar = ( char ) ( '@' + text [ i ] ) ;
262
262
MaybeEmphasize ( ref _consoleBuffer [ j ++ ] , i , foregroundColor , backgroundColor ) ;
263
263
264
264
}
265
- else if ( size > 1 && IsCJKOutputCodePage ( ) && _trueTypeInUse )
265
+ else if ( size > 1 && IsCJKOutputCodePage ( ) && _trueTypeInUse )
266
266
{
267
267
_consoleBuffer [ j ] . UnicodeChar = text [ i ] ;
268
- _consoleBuffer [ j ] . Attributes = ( ushort ) ( ( uint ) _consoleBuffer [ j ] . Attributes |
269
- ( uint ) CHAR_INFO_Attributes . COMMON_LVB_LEADING_BYTE ) ;
268
+ _consoleBuffer [ j ] . Attributes = ( ushort ) ( ( uint ) _consoleBuffer [ j ] . Attributes |
269
+ ( uint ) CHAR_INFO_Attributes . COMMON_LVB_LEADING_BYTE ) ;
270
270
MaybeEmphasize ( ref _consoleBuffer [ j ++ ] , i , foregroundColor , backgroundColor ) ;
271
271
_consoleBuffer [ j ] . UnicodeChar = text [ i ] ;
272
- _consoleBuffer [ j ] . Attributes = ( ushort ) ( ( uint ) _consoleBuffer [ j ] . Attributes |
273
- ( uint ) CHAR_INFO_Attributes . COMMON_LVB_TRAILING_BYTE ) ;
272
+ _consoleBuffer [ j ] . Attributes = ( ushort ) ( ( uint ) _consoleBuffer [ j ] . Attributes |
273
+ ( uint ) CHAR_INFO_Attributes . COMMON_LVB_TRAILING_BYTE ) ;
274
274
MaybeEmphasize ( ref _consoleBuffer [ j ++ ] , i , foregroundColor , backgroundColor ) ;
275
275
}
276
276
else
@@ -283,10 +283,10 @@ private void ReallyRender()
283
283
}
284
284
finally
285
285
{
286
- if ( _hwnd != ( IntPtr ) 0 && _hDC != ( IntPtr ) 0 )
287
- {
288
- NativeMethods . ReleaseDC ( _hwnd , _hDC ) ;
289
- }
286
+ if ( _hwnd != ( IntPtr ) 0 && _hDC != ( IntPtr ) 0 )
287
+ {
288
+ NativeMethods . ReleaseDC ( _hwnd , _hDC ) ;
289
+ }
290
290
}
291
291
292
292
for ( ; j < ( _consoleBuffer . Length - ( statusLineCount * _bufferWidth ) ) ; j ++ )
@@ -601,7 +601,7 @@ private void PlaceCursor()
601
601
int y = coordinates . Y ;
602
602
PlaceCursor ( coordinates . X , ref y ) ;
603
603
}
604
-
604
+
605
605
private int LengthInBufferCells ( char c )
606
606
{
607
607
int length = char . IsControl ( c ) ? 1 : 0 ;
0 commit comments