UIA: incorrect move to previous word #10779

Open
opened 2026-01-31 02:30:07 +00:00 by claunia · 0 comments
Owner

Originally created by @codeofdusk on GitHub (Sep 25, 2020).

Originally assigned to: @carlos-zamora on GitHub.

Since #7677 was merged:

In the NVDA Python console (NVDA+control+z):

Word

>>> # In a Word document (accessed VIA UIA, positioned on the start of the text "My name is Carlos"):
>>> ti=nav.makeTextInfo("caret")
>>> ti.expand("word")
>>> ti.text
'My '
>>> ti.collapse() # Make a degenerate range (move end to start)
>>> ti.move("word", 1)
1
>>> ti.expand("word")
>>> ti.text
'name '
>>> ti.collapse()
>>> ti.move("word", -1)
-1
>>> ti.expand("character")
>>> ti.text
'M' # GOOD

conhost

>>> # Now, in Conhost
>>> ti=nav.makeTextInfo("caret")
>>> ti.expand("word")
>>> ti.text
'C:\\Users\\codeofdusk>My '
>>> ti.collapse() # Make a degenerate range (move end to start)
>>> ti.move("word", 1)
1
>>> ti.expand("word")
>>> ti.text
'name '
>>> ti.collapse()
>>> ti.move("word", -1)
-1
>>> ti.expand("character")
>>> ti.text
' ' # BAD

Cc @carlos-zamora.

Originally created by @codeofdusk on GitHub (Sep 25, 2020). Originally assigned to: @carlos-zamora on GitHub. Since #7677 was merged: In the NVDA Python console (NVDA+control+z): ### Word ```python console >>> # In a Word document (accessed VIA UIA, positioned on the start of the text "My name is Carlos"): >>> ti=nav.makeTextInfo("caret") >>> ti.expand("word") >>> ti.text 'My ' >>> ti.collapse() # Make a degenerate range (move end to start) >>> ti.move("word", 1) 1 >>> ti.expand("word") >>> ti.text 'name ' >>> ti.collapse() >>> ti.move("word", -1) -1 >>> ti.expand("character") >>> ti.text 'M' # GOOD ``` ### conhost ```python console >>> # Now, in Conhost >>> ti=nav.makeTextInfo("caret") >>> ti.expand("word") >>> ti.text 'C:\\Users\\codeofdusk>My ' >>> ti.collapse() # Make a degenerate range (move end to start) >>> ti.move("word", 1) 1 >>> ti.expand("word") >>> ti.text 'name ' >>> ti.collapse() >>> ti.move("word", -1) -1 >>> ti.expand("character") >>> ti.text ' ' # BAD ``` Cc @carlos-zamora.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10779