Skip to content

Cursor shape not preserved #903

@breyed

Description

@breyed

PSReadLine resets the cursor shape, causing the user's setting to no longer be applied. If PSReadLine has a reason to change the cursor shape temporarily, it should restore the user's setting when it's done.
Migrated from microsoft/terminal#409.
Duplicate: microsoft/terminal#1145 -- it has detailed repro steps to show the problem.

Note

This is not related to the VI edit mode.
This only happens when setting cursor shape in the Terminal tab in console host.
When using Windows Terminal and set the cursor shape in Profile.json, the cursor doesn't get reset by PSReadLine.

Environment data

PS version: 7.0.0-rc.1
PSReadline version: 2.0.0-rc1
os: 10.0.18362.1 (WinBuild.160101.0800)
PS file version: 7.0.0.0
HostName: ConsoleHost
BufferWidth: 145
BufferHeight: 9001

Steps to reproduce or exception report

  1. Open pwsh in console host
  2. Right click on a console window and select Properties -> Terminal
  3. Set the Cursor Shape to anything other than "Use Legacy Style"
  4. Notice that the cursor shows up correctly but after hitting enter and typing a few characters, it returns to the default style
  5. Repeat step 1 and notice that your setting has been reverted to "Use Legacy Style"

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions