Keep degenerate UIA text ranges degenerate after movement#7530
Keep degenerate UIA text ranges degenerate after movement#75307 commits merged intomicrosoft:masterfrom
Conversation
ebfd789 to
3eb15fc
Compare
carlos-zamora
left a comment
There was a problem hiding this comment.
This test is failing:
Not too bad though. Just change this line to:
{4, 0+1}
Bonus points if you add a similar test to CanMoveByLine tests here:
|
Forgot to say, other than that, it looks good! Thanks! |
Co-authored-by: Carlos Zamora <[email protected]>
carlos-zamora
left a comment
There was a problem hiding this comment.
We're close 😊
Also, we have a code formatter. To run it, do this in your terminal:
# in pwsh, go to the repo's directory
Import-Module .\tools\OpenConsole.psm1
Invoke-CodeFormat
src/interactivity/win32/ut_interactivity_win32/UiaTextRangeTests.cpp
Outdated
Show resolved
Hide resolved
src/interactivity/win32/ut_interactivity_win32/UiaTextRangeTests.cpp
Outdated
Show resolved
Hide resolved
src/interactivity/win32/ut_interactivity_win32/UiaTextRangeTests.cpp
Outdated
Show resolved
Hide resolved
…ts.cpp Co-authored-by: Carlos Zamora <[email protected]>
DHowett
left a comment
There was a problem hiding this comment.
This is excellent, and a very good catch. Thank you 😄L
|
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
|
@carlos-zamora double-tap plz |
|
Any rough timeline for when this will make it to insider inbox? |
|
This is merging to Windows today; it will be a couple weeks before it goes out to Insiders. 😄 Thanks again for the contribution. I'll let you know when it's out. |
Conhost expands UIA text ranges when moved. This means that degenerate ranges become non-degenerate after movement, leading to odd behaviour from UIA clients. This PR doesn't expand degenerate ranges, but rather keeps them degenerate by moving `_end` to the newly-changed `_start`. Tested in the NVDA Python console (cases with `setEndPoint` and `compareEndPoints` described in #7342). Also ran the logic by @michaelDCurran. Closes #7342 Almost definitely addresses nvaccess/nvda#11288 (although I'll need to test with my Braille display). Also fixes an issue privately reported to me by @Simon818 with copy/paste from review cursor which originally lead me to believe the issue was with `moveEndPointByRange`. (cherry picked from commit 7a03f75)
|
🎉 Handy links: |
|
🎉 Handy links: |
Conhost expands UIA text ranges when moved. This means that degenerate
ranges become non-degenerate after movement, leading to odd behaviour
from UIA clients. This PR doesn't expand degenerate ranges, but rather
keeps them degenerate by moving
_endto the newly-changed_start.Tested in the NVDA Python console (cases with
setEndPointandcompareEndPointsdescribed in #7342). Also ran the logic by@michaelDCurran.
Closes #7342 and nvaccess/nvda#11288
Also fixes an issue privately reported to
me by @Simon818 with copy/paste from review cursor which originally lead
me to believe the issue was with
moveEndPointByRange.