Update magnifier Point at start#19780
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes magnifier caret-follow failures when the caret is positioned at end-of-text by improving how OffsetsTextInfo.pointAtStart is computed when the current offset can’t be mapped to screen coordinates.
Changes:
- Extend
_get_pointAtStartto handleLookupErroras well asNotImplementedErrorwhen resolving a point for the current offset. - Add a fallback for collapsed ranges to use the previous character’s offset when the caret is at end-of-text and current-offset location lookup fails.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I am not an expert of this code. But I wonder if it would not be better, if possible, to implement the fallback in magnifier files rather than in |
|
I think I agree with @CyrilleB79 here. |
|
Is this ready for re-review? |
…fix/NVDAPythonConsole
…fix/NVDAPythonConsole
Link to issue number:
fixes #19746
Summary of the issue:
Text caret follow would fail in some text editor (python console of nvda or notepad), if it would be the last character
Description of user facing changes:
text caret will now focus properly end character
Description of developer facing changes:
Description of development approach:
Update
_get_pointAtStartnow falls back to the previous character's position when the caret is at end-of-text and both_getBoundingRectFromOffsetand_getPointFromOffsetfail for the current offset.Testing strategy:
Manual
Known issues with pull request:
Code Review Checklist: