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:
parent
a2270ceb2d
commit
7cd8b1f3ee
1 changed files with 2 additions and 5 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue