Skip to content

Commit 016da8d

Browse files
committed
Fix line endings
1 parent 432dc05 commit 016da8d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

PSReadLine/Render.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,15 @@ void UpdateColorsIfNecessary(string newColor)
383383
// 1. console buffer was resized and the regular prompt takes a whole line of the new width buffer; OR
384384
// 2. the prompt function was changed and the new prompt is shorter than the error prompt.
385385
// when this happens, we skip changing the color of the prompt.
386-
if (_console.CursorLeft >= promptBufferCells)
387-
{
388-
_console.CursorLeft -= promptBufferCells;
389-
var color = renderData.errorPrompt ? _options._errorColor : defaultColor;
390-
if (renderData.errorPrompt && promptBufferCells != promptText.Length)
391-
promptText = promptText.Substring(promptText.Length - promptBufferCells);
392-
UpdateColorsIfNecessary(color);
393-
_console.Write(promptText);
394-
_console.Write("\x1b[0m");
386+
if (_console.CursorLeft >= promptBufferCells)
387+
{
388+
_console.CursorLeft -= promptBufferCells;
389+
var color = renderData.errorPrompt ? _options._errorColor : defaultColor;
390+
if (renderData.errorPrompt && promptBufferCells != promptText.Length)
391+
promptText = promptText.Substring(promptText.Length - promptBufferCells);
392+
UpdateColorsIfNecessary(color);
393+
_console.Write(promptText);
394+
_console.Write("\x1b[0m");
395395
}
396396
}
397397
}

0 commit comments

Comments
 (0)