Skip to content

Fix search result navigation behavior#380

Merged
cary-rowen merged 1 commit into
developfrom
fix/search-result-navigation
May 24, 2026
Merged

Fix search result navigation behavior#380
cary-rowen merged 1 commit into
developfrom
fix/search-result-navigation

Conversation

@cary-rowen

Copy link
Copy Markdown
Collaborator

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:

  • F3 / Shift+F3 across multiple matches on the same line.
  • F3 / Shift+F3 after selecting a result from the search results dialog.
  • No next / previous result behavior, including cursor not moving and feedback being announced.
  • Regex search results, including zero-width match fallback behavior.

Also ran:

  • uv run --no-sync pytest tests\test_search.py -q
  • uv run --no-sync pytest -q

Known issues with pull request:

None known.

@cary-rowen
cary-rowen merged commit 707af85 into develop May 24, 2026
10 checks passed
@cary-rowen
cary-rowen deleted the fix/search-result-navigation branch May 24, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant