Terminal: Cursor shape not preserved in PowerShell

Created on 11 Apr 2019  路  2Comments  路  Source: microsoft/terminal

  • Your Windows build number: 10.0.18362.53

  • What you're doing and what's happening:
    Open PowerShell (5.1.18362.1)
    Set cursor shape to Solid Box (or any other non-legacy)
    Cursor is solid
    Execute command (e.g. cd, ls )
    Cursor is back to legacy shape

CMD or WSL bash work as they should

  • What's wrong / what should be happening instead:

Cursor shape should stay fixed.

Resolution-External

Most helpful comment

If you do a Remove-Module PSReadline, then Powershell works as expected. I believe that this is a bug in their code, so I'll point you at lzybkr/PSReadLine to file the issue on them.

The root cause is that calling the SetConsoleCursorInfo API will reset the console's cursor size to whatever they've requested in that API call., and that it's currently not possible to set cursor shapes with that API.

All 2 comments

If you do a Remove-Module PSReadline, then Powershell works as expected. I believe that this is a bug in their code, so I'll point you at lzybkr/PSReadLine to file the issue on them.

The root cause is that calling the SetConsoleCursorInfo API will reset the console's cursor size to whatever they've requested in that API call., and that it's currently not possible to set cursor shapes with that API.

Same here. Windows 19 1909.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wkbrd picture wkbrd  路  3Comments

TayYuanGeng picture TayYuanGeng  路  3Comments

xmm1989218 picture xmm1989218  路  3Comments

dev-logan picture dev-logan  路  3Comments

ghost picture ghost  路  3Comments