Respect the search reverse direction when pressing NVDA+shift+F3 first call #11771
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Link to issue number:
Fixes #11770
Summary of the issue:
When pressing NVDA+shift+F3 in browse mode for first time, the find dialog opens since nothing was searched before. However, the find dialog always considers that the term to find should be after the current cursor position.
In the case of NVDA+shift+F3 however, the user has clearly indicated that he wants to search backwards; this is not respected in this case.
Description of how this pull request fixes the issue:
Add a boolean "reverse" parameter to the script_find and the FindDialog so that reverse searching can be honoured in this case.
This PR does the minimum to fix #11770.
Even if the FindDialog contains the information to know if search should be forward or backward (depending on how it was called), this information does not appear in the GUI and cannot be controlled/changed in the dialog.
This would be a new feature and may be the object of another PR if there is a need for it.
Testing performed:
Tested these situations when nothing has been searched before:
Also tested these cases when something has been already searched before.
Known issues with pull request:
None
Change log entry:
Section: Bug fixes
The backward search direction is now respected when calling find previous script as first search action. (#11770)
Note: feel free to rephrase this change log entry; I did not find better.