You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PSReadine doesnt clear multiline text when Escape pressed #607
Please open another issue and include some details like how you close PowerShell and the versions of Windows and PowerShell where you see this behavior.
I have reproduced the problem on Win7 as well as Win10 in legacy mode.
There is a difference in how conhost handles Console.WriteLine() when at the end of the line. I'll think more about a fix - and hopefully this difference doesn't come up elsewhere - I think it came up in menu completion (which is fixed now) but I don't think the same fix will work here.
Back to old problem :)
this diff fixes rendering on win7 and I do not see any difference of WinSrv2016. It doesn't break anything (I try to check it on Win10 later)
Do not try any Linuxes, may be it need to tune up
--- Render~orig.cs Tue Nov 06 11:49:37 2018+++ Render.cs Tue Nov 06 11:48:58 2018@@ -486,7 +486,7 @@
while (previousPhysicalLine > physicalLine)
{
- _console.Write("\n");+ //_console.Write("\n");
physicalLine += 1;
var lenToClear = physicalLine == previousPhysicalLine ? lenPrevLastLine : bufferWidth;
if (lenToClear > 0)
May be I don't uderstand something but it just works :O
It also reproduced on my Windows 8.1. When I navigate through my history containing multi-line commands
Commenting line _console.Write("\n"); helps. Thanks Max Kozlov (@MVKozlov)
It would be good to fix it PR
Activity
lzybkr commentedon Dec 8, 2017
Strange, I've been self hosting for months and should have noticed this. It will be a few days before I can take a look.
MVKozlov commentedon Dec 9, 2017
Tested on another WIn7, same effect
on Win10 all ok
MVKozlov commentedon Dec 11, 2017
I addition: Powershell shutdown/unload time on 2.0 up to 6-7 sec :(
lzybkr commentedon Dec 11, 2017
Please open another issue and include some details like how you close PowerShell and the versions of Windows and PowerShell where you see this behavior.
lzybkr commentedon Dec 17, 2017
I have reproduced the problem on Win7 as well as Win10 in legacy mode.
There is a difference in how
conhosthandlesConsole.WriteLine()when at the end of the line. I'll think more about a fix - and hopefully this difference doesn't come up elsewhere - I think it came up in menu completion (which is fixed now) but I don't think the same fix will work here.MVKozlov commentedon Nov 6, 2018
Back to old problem :)
this diff fixes rendering on win7 and I do not see any difference of WinSrv2016. It doesn't break anything (I try to check it on Win10 later)
Do not try any Linuxes, may be it need to tune up
May be I don't uderstand something but it just works :O
lzybkr commentedon Nov 6, 2018
Feel free to submit a PR.
MVKozlov commentedon Nov 7, 2018
I'll wait until I'm at least understand what this code should do and test it on win10/linuxes :)
s-shamesmuhametov-parc commentedon Mar 4, 2019
It also reproduced on my Windows 8.1. When I navigate through my history containing multi-line commands
Commenting line _console.Write("\n"); helps. Thanks Max Kozlov (@MVKozlov)
It would be good to fix it PR
daxian-dbw commentedon Apr 28, 2023
I cannot reproduce this anymore on Windows Server 2012R2 (legacy mode), so it should have been fixed.