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
NVDA reports selection incorectly in VS 2008 code editor #1358
Comments
Comment 1 by aleksey_s on 2011-02-08 08:43 This raises a question whether !EditableTextWithoutAutoselectDetection was correctly chosen as a base class for the control. What events object is expected to fire for auto select detection to work? I contacted original author of the app module without any response. |
Comment 2 by jteh (in reply to comment 1) on 2011-02-08 09:40
This means that NVDA just detects selection changes when you press selection keys. Events are not used. If this is reporting double changes, there is most likely a bug in the !TextInfo implementation somewhere. You should debug this before addressing the following question.
See the NVDAObjects.behaviors.!EditableTextWithAutoSelectDetection class. We now know it fires valueChange, so generally, you'd make valueChange call textChange. |
Comment 3 by aleksey_s (in reply to comment 2) on 2011-02-08 11:06
So it will not be able to detect selection if done with mouse, or programmatically, right?
There definitely are bugs in !TextInfo implementation, e.g. seems that in vs API offsets are calculated from 1, not from 0, but !TextInfo code isn't always aware of it. Finally, I think that !VsTextEditPaneTextInfo doesn't need to be derived from !OffsetsTextInfo, since it can expand to word by using vs API and so on, with lesser number of calls to the API. However, I am not so good with understanding the basic !TextInfo. Currently, !OfssetsTextInfo is easier to understand for me. Anyway, I am not sure how this can affect select detection so that it reports twice. the !VsTextEditPaneTextInfo doesn't manage when to report selection changes, it just informs about selection offsets when requested by !OffsetsTextInfo. |
Comment 4 by jteh (in reply to comment 3) on 2011-02-08 18:38
I'm not really sure either. The script you're interested in is editableText.!EditableTextWithoutAutoSelectDetection.script_caret_changeSelection. In short, it fetches the old selection, sends the key, fetches the new one and sends them off to be compared/spoken. If the old selection is somehow wrong or the offsets change, it can cause problems. I suggest you start debugging by looking at the offsets of the old and new selections. |
Closing as won't fix because VS2008 is quite old now |
Reported by aleksey_s on 2011-02-08 08:37
STR:
Actual results:
NVDA announces "#include <iostream"
Expected results:
NVDA should announce "#include "
The text was updated successfully, but these errors were encountered: