mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 17:53:58 +08:00
Merge pull request #1712 from PowerShell/ealexjordan/filenamecrash
Fixing Crash on File Name Extending BufferWidth
This commit is contained in:
commit
4e23d6e1ee
@ -557,13 +557,18 @@ namespace Microsoft.PowerShell
|
||||
_visualSelectionCommandCount = 0;
|
||||
_statusIsErrorMessage = false;
|
||||
|
||||
_consoleBuffer = ReadBufferLines(_initialY, 1 + Options.ExtraPromptLineCount);
|
||||
|
||||
#if UNIX // TODO: not necessary if ReadBufferLines worked, or if rendering worked on spans instead of complete lines
|
||||
string newPrompt = GetPrompt();
|
||||
var bufferLineCount = (newPrompt.Length) / (_console.BufferWidth) + 1;
|
||||
_consoleBuffer = ReadBufferLines(_initialY, bufferLineCount);
|
||||
|
||||
for (int i=0; i<newPrompt.Length; ++i)
|
||||
{
|
||||
_consoleBuffer[i].UnicodeChar = newPrompt[i];
|
||||
}
|
||||
#else
|
||||
_consoleBuffer = ReadBufferLines(_initialY, 1 + Options.ExtraPromptLineCount);
|
||||
#endif
|
||||
_lastRenderTime = Stopwatch.StartNew();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user