[console]::CursorVisible acting funny in v0.9 (Powershell) with custom prompt #6436

Closed
opened 2026-01-31 00:38:39 +00:00 by claunia · 4 comments
Owner

Originally created by @OtterKring on GitHub (Feb 14, 2020).

Environment


Windows build number:
Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18363.0 Microsoft Windows NT 10.0.18363.0

Windows Terminal version (if applicable): 0.9.433.0

Any other software?

Steps to reproduce

  1. run a tab with PowerShell 5.1 or 7rc-2

  2. use this prompt function in your profile:
    Github: OtterKring's TimeMeasuringPrompt
    It will add the runtime of the previous command at the very right of the cmdline.

  3. run [console]::CursorVisible = $false

cursor does not disappear (which it did not do either in previous versions of WT) but stays at the end of the line after the time string written in the custom prompt function.

  1. run [console]::CursorVisible =$true

cursor is back to normal

Expected behavior

The command [console]::CursorVisible = $false should hide the cursor. Compare functionality of standard Powershell consoles.

Actual behavior

Cursor does not vanish but stays after the last character written by the custom prompt function.

Originally created by @OtterKring on GitHub (Feb 14, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.18363.0 Microsoft Windows NT 10.0.18363.0 Windows Terminal version (if applicable): 0.9.433.0 Any other software? ``` # Steps to reproduce 1) run a tab with PowerShell 5.1 or 7rc-2 2) use this prompt function in your profile: [Github: OtterKring's TimeMeasuringPrompt](https://github.com/OtterKring/PS_TimeMeasuringPrompt) It will add the runtime of the previous command at the very right of the cmdline. 3) run `[console]::CursorVisible = $false` > cursor does not disappear (which it did not do either in previous versions of WT) but stays at the end of the line after the time string written in the custom prompt function. 4) run `[console]::CursorVisible =$true` > cursor is back to normal # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> The command `[console]::CursorVisible = $false` should hide the cursor. Compare functionality of standard Powershell consoles. # Actual behavior <!-- What's actually happening? --> Cursor does not vanish but stays after the last character written by the custom prompt function.
claunia added the Resolution-Duplicate label 2026-01-31 00:38:39 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 18, 2020):

Funny enough, this is the same as /dup #3093

@DHowett-MSFT commented on GitHub (Feb 18, 2020): Funny enough, this is the same as /dup #3093
Author
Owner

@ghost commented on GitHub (Feb 18, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Feb 18, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Author
Owner

@DHowett-MSFT commented on GitHub (Feb 18, 2020):

(Conhost thinks the terminal is respecting the cursor position, so it doesn't update its position as readily. It thinks it cannot be seen. 😄)

@DHowett-MSFT commented on GitHub (Feb 18, 2020): (Conhost thinks the terminal is respecting the cursor position, so it doesn't update its position as readily. It thinks it cannot be seen. :smile:)
Author
Owner

@OtterKring commented on GitHub (Feb 18, 2020):

Lol!

@OtterKring commented on GitHub (Feb 18, 2020): Lol!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6436