Skip to content

fix: highlight active match when opening find/replace widget#287795

Open
kiofaw wants to merge 1 commit intomicrosoft:mainfrom
kiofaw:fix/find-highlight-on-search
Open

fix: highlight active match when opening find/replace widget#287795
kiofaw wants to merge 1 commit intomicrosoft:mainfrom
kiofaw:fix/find-highlight-on-search

Conversation

@kiofaw
Copy link
Copy Markdown
Contributor

@kiofaw kiofaw commented Jan 14, 2026

fix: #15067
Fixes the issue where the current match is not visually highlighted when opening the Find (Ctrl+F) or Find and Replace (Ctrl+H) widget.

  • When find matches are computed, immediately highlight the current match (the one at or after the cursor position)
  • Pass the actual currentMatch range to changeMatchInfo() instead of undefined
  • This ensures the active match is always visually indicated when the find widget is opened

Unit tests updated in findModel.test.ts

Before

actual.mp4

After

expected.mp4

@kiofaw
Copy link
Copy Markdown
Contributor Author

kiofaw commented Jan 14, 2026

@microsoft-github-policy-service agree

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.

Triggering actions.find causes active match to lose its highlight.

3 participants