Skip to content

Commit 6f0ccf4

Browse files
authored
Fix an 'ArgumentOutOfRangeException' when error prompt contains CJK (#1206)
1 parent 599e178 commit 6f0ccf4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

PSReadLine/Render.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,10 +430,6 @@ private bool RenderErrorPrompt(RenderData renderData, string defaultColor)
430430
if (!promptText.Contains('\x1b'))
431431
{
432432
string color = renderData.errorPrompt ? _options._errorColor : defaultColor;
433-
if (renderData.errorPrompt && promptBufferCells != promptText.Length)
434-
{
435-
promptText = promptText.Substring(promptText.Length - promptBufferCells);
436-
}
437433
_console.Write(color);
438434
}
439435
_console.Write(promptText);

0 commit comments

Comments
 (0)