Fix search result navigation behavior#380
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
N/A
Summary of the issue:
Find Next and Find Previous did not consistently move between individual search matches, especially when multiple results appeared on the same line. When no result existed in the requested direction, the cursor could still move without a clear user-facing message.
Description of how this pull request fixes the issue:
This updates search result navigation so F3 and Shift+F3 move to the next or previous actual search match and select the matched text.
If there is no next or previous result, Bookworm now keeps the cursor and selection unchanged, plays the existing navigation feedback sound, and announces a short localizable message.
The search results dialog also updates the current search result state, so Find Next/Previous continues from the result selected in the dialog.
Testing performed:
Manual testing performed for:
Also ran:
uv run --no-sync pytest tests\test_search.py -quv run --no-sync pytest -qKnown issues with pull request:
None known.