Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.PlatformNotSupportedException when CTRL+L #922

Closed
sorge13248 opened this issue May 17, 2019 · 5 comments
Closed

System.PlatformNotSupportedException when CTRL+L #922

sorge13248 opened this issue May 17, 2019 · 5 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@sorge13248
Copy link

Stack trace

Last 2 Keys:

 Ctrl+l Ctrl+l

Exception:

System.PlatformNotSupportedException: Operation is not supported on this platform.
   at System.ConsolePal.SetWindowPosition(Int32 left, Int32 top)
   at System.Console.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.SetWindowPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.PSConsoleReadLine.ClearScreen(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)

Environment data

PS version: 6.2.0
PSReadline version: 2.0.0-beta3
os: Linux shi-tri-lin 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
PS file version:

Steps to reproduce or exception report

  1. Launch PoweShell pwsh
  2. Press CTRL+L two times
  3. Exception happens
@SteveL-MSFT
Copy link
Member

This doesn't repro on 2.0.0-beta.4 on Ubuntu 18.04

@lzybkr
Copy link
Member

lzybkr commented Jun 18, 2019

@SteveL-MSFT - This has been reported multiple times and likely is still an issue as nothing has been done to avoid the exception. But you might tag it as a dupe when you find the similar issues.

@SteveL-MSFT SteveL-MSFT reopened this Jun 20, 2019
@SteveL-MSFT SteveL-MSFT added the Needs-Repro There is no sufficient information on repro steps. label Jun 20, 2019
@daxian-dbw daxian-dbw added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Waiting-on-Author Needs-Repro There is no sufficient information on repro steps. labels Sep 15, 2019
@daxian-dbw
Copy link
Member

close as a duplicate of #991

@daxian-dbw
Copy link
Member

Keep this issue open, as #991 is originally about a ArgumentOutOfRangeException.

@daxian-dbw
Copy link
Member

daxian-dbw commented Jan 3, 2020

I took a closer look at this issue today and I think the issue had already been fixed by #790, which changed the implementation of ClearScreen from using Console.ScrollBuffer, console.SetCursorPosition and console.SetWindowPosition to applying the escape sequence "0x1b[2J".

That change was included in 2.0.0-beta4 and newer versions, this issue was reported to happen in 2.0.0-beta3.

@sorge13248 Please try out the 2.0.0-rc1 version of PSReadLine from PowerShell Gallery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants