Use StringBuilder append instead of insert

For the special case of having a string to insert on the buffer, switch from calling this.Insert to appending the string directly (and incrementing the count appropriately).
This commit is contained in:
Andrew Schwartzmeyer 2015-12-22 12:03:44 -08:00
parent a2270ceb2d
commit 7cd8b1f3ee

View file

@ -292,11 +292,8 @@ namespace Microsoft.PowerShell.Linux.Host
//reset prompt and buffer
OnEscape();
//set the buffer to the string
for (int i = 0; i < endResult.Length; i++)
{
this.Insert(endResult[i]);
}
this.buffer.Append(endResult);
this.current += endResult.Length;
}
/// <summary>