Skip to content

Commit f1e3ed3

Browse files
committed
Formatting cleanup
1 parent 4fab3e8 commit f1e3ed3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

PSReadLine/Render.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,11 @@ private void ReallyRender()
160160
}
161161
_consoleBuffer = newBuffer;
162162
}
163-
163+
164164
for (int i = 0; i < text.Length; i++)
165165
{
166166
SavedTokenState state = null;
167-
totalBytes = totalBytes%bufferWidth;
167+
totalBytes = totalBytes % bufferWidth;
168168
if (!afterLastToken)
169169
{
170170
// Figure out the color of the character - if it's in a token,
@@ -228,7 +228,7 @@ private void ReallyRender()
228228

229229
if (text[i] == '\n')
230230
{
231-
while ((j%bufferWidth) != 0)
231+
while ((j % bufferWidth) != 0)
232232
{
233233
_consoleBuffer[j++] = _space;
234234
}
@@ -247,7 +247,7 @@ private void ReallyRender()
247247

248248
//if there is no enough space for the character at the edge, fill in spaces at the end and
249249
//put the character to next line.
250-
int filling = totalBytes > bufferWidth ? (totalBytes - bufferWidth)%size : 0;
250+
int filling = totalBytes > bufferWidth ? (totalBytes - bufferWidth) % size : 0;
251251
for (int f = 0; f < filling; f++)
252252
{
253253
_consoleBuffer[j++] = _space;
@@ -258,19 +258,19 @@ private void ReallyRender()
258258
{
259259
_consoleBuffer[j].UnicodeChar = '^';
260260
MaybeEmphasize(ref _consoleBuffer[j++], i, foregroundColor, backgroundColor);
261-
_consoleBuffer[j].UnicodeChar = (char) ('@' + text[i]);
261+
_consoleBuffer[j].UnicodeChar = (char)('@' + text[i]);
262262
MaybeEmphasize(ref _consoleBuffer[j++], i, foregroundColor, backgroundColor);
263263

264264
}
265-
else if (size > 1 && IsCJKOutputCodePage() && _trueTypeInUse)
265+
else if (size > 1 && IsCJKOutputCodePage() && _trueTypeInUse)
266266
{
267267
_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);
270270
MaybeEmphasize(ref _consoleBuffer[j++], i, foregroundColor, backgroundColor);
271271
_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);
274274
MaybeEmphasize(ref _consoleBuffer[j++], i, foregroundColor, backgroundColor);
275275
}
276276
else
@@ -283,10 +283,10 @@ private void ReallyRender()
283283
}
284284
finally
285285
{
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+
}
290290
}
291291

292292
for (; j < (_consoleBuffer.Length - (statusLineCount * _bufferWidth)); j++)
@@ -601,7 +601,7 @@ private void PlaceCursor()
601601
int y = coordinates.Y;
602602
PlaceCursor(coordinates.X, ref y);
603603
}
604-
604+
605605
private int LengthInBufferCells(char c)
606606
{
607607
int length = char.IsControl(c) ? 1 : 0;

0 commit comments

Comments
 (0)