Skip to content

System's Text Cursor Indicator is ignored on new tab and also moving its window using only keyboard and GuiThreadInfo's GetCaretPos doesn't return its caret position #6805

Closed
@vhanla

Description

@vhanla

Environment

Windows build number: Microsoft Windows [Versión 10.0.19041.329]
Windows Terminal version (if applicable): 1.0.1811.0

Any other software?

Steps to reproduce

Enable Windows's Text Cursor Indicator in Control Panel.
imagen

1st scenario.

Open a new TAB, then you will notice that the Text Cursor Indicator is not working anymore.
cursor issue 01b

2nd scenario.

Move current Windows Terminal window using only keyboard as following:
Press Alt+Space select Move menu item then move it using the arrow keys.
Now the Text Cursor Indicator stops following your typing cursor position.
imagen
imagen

3rd scenario.

Use Winapi using GetGUIThreadInfo combined with GetCaretPos, to ge curret window's caret position.
Or just use the demo project from https://www.codeproject.com/articles/34520/getting-caret-position-inside-any-application
It works even CMD and PowerShell, but not in Windows Terminal.

Expected behavior

Keep tracking the text cursor indicator, without using workarounds to restore it as mentioned below.

And for the GetCaretPos issue, it should return the caret poition for third party tools, not only system's Text Cursor Indicator.

Actual behavior

Text cursor indicator is ignored after those steps, and needs other steps to restore th cursor indicator tracker.

NOTICE To restore Text Cursor Indicator is possible by switching back and forth wih Alt+Tab or switching among tabs.

About the GetCaretPos issue, I wrote a tool to highlight the caret position for teaching purposes, specially to attract attention towards the caret position, it even follows the caret position.
imagen
Since GetCaretPos offers that opportunity to achieve that, it is a convenient way for tools like this to help users for whatever reasons they want, like the tool in the picture above, which is working perfectly in the cmd console shell, notepad, powershell's, etc.
However, on Windows Terminal (and Visual Studio Code too) GetCaretPos doesn't work as expected.

I reported this issues since they seem related in someway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-AccessibilityIssues related to accessibilityArea-TerminalControlIssues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.)Issue-BugIt either shouldn't be doing this or needs an investigation.Priority-1A description (P1)Product-TerminalThe new Windows Terminal.Resolution-Fix-CommittedFix is checked in, but it might be 3-4 weeks until a release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions