Skip to content

UIA: degenerate text ranges not degenerate after move #7342

@codeofdusk

Description

@codeofdusk

Environment

Windows build number: [run `[Environment]::OSVersion` for powershell, or `ver` for cmd] Latest master of OpenConsole
Windows Terminal version (if applicable):

Any other software? NVDA

Steps to reproduce

>>> # In the NVDA Python console (NVDA+control+z)
>>> # In a Microsoft Word document (using UIA for access, enable in advanced settings), caret positioned on the first "C" in "Cactus".
>>> start = nav.makeTextInfo("caret")
>>> end = start.copy()
>>> end.move("character", 2) # move to the second "c".
2
>>> marker=start.copy()
>>> marker.setEndPoint(start, "startToStart") # Calls MoveEndpointByRange for UIA controls.
>>> marker.setEndPoint(end, "endToEnd")
>>> marker.text
'Ca' # GOOD

>>> # Now, in conhost with UIA enabled
>>> start = nav.makeTextInfo("caret")
>>> end = start.copy()
>>> end.move("character", 2)
2
>>> marker=start.copy()
>>> marker.setEndPoint(start, "startToStart")
>>> marker.setEndPoint(end, "endToEnd")
>>> marker.text
'Cac' # BAD

Expected behaviour

Conhost matches Microsoft Word when calling MoveEndpointByRange.

Actual behaviour

See above.

Metadata

Metadata

Assignees

Labels

Area-AccessibilityIssues related to accessibilityIssue-BugIt either shouldn't be doing this or needs an investigation.Priority-1A description (P1)Product-ConhostFor issues in the Console codebaseProduct-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