-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep degenerate UIA text ranges degenerate after movement #7530
Conversation
ebfd789
to
3eb15fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is failing:
MoveTest{ |
Not too bad though. Just change this line to:
{4, 0+1}
Bonus points if you add a similar test to CanMoveByLine
tests here:
TEST_METHOD(CanMoveByLine) |
Forgot to say, other than that, it looks good! Thanks! |
Co-authored-by: Carlos Zamora <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
_end
to the newly-changed_start
.Tested in the NVDA Python console (cases with
setEndPoint
andcompareEndPoints
described 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
.