Skip to content

Fix Add Selection to Next Find Match with regex - #336963

Open
Nirajan Banjade (NirajanBanjade) wants to merge 2 commits into
microsoft:mainfrom
NirajanBanjade:fix-regex-add-selection-next-match
Open

Nirajan Banjade (NirajanBanjade) wants to merge 2 commits into
microsoft:mainfrom
NirajanBanjade:fix-regex-add-selection-next-match

Conversation

@NirajanBanjade

Copy link
Copy Markdown

Fixes #107090

This fixes "Add Selection to Next Find Match" when regex mode is enabled.

Previously, after selecting a regex match in the editor, the multicursor session could fall back to the literal selected text instead of preserving the regex query.

This change preserves the active regex query when the current editor selection exactly matches that regex in the document.

Testing:

  • Added regression tests for regex Find + Add Selection to Next Find Match
  • Added coverage for anchored regex behavior
  • Verified manually with foo\d matching foo1, foo2, foo3, and foo4
  • Verified normal non-regex Cmd+D behavior still works

Copilot AI balanced review requested due to automatic review settings September 21, 2026 01:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

Review effort: Balanced
Findings: None


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@NirajanBanjade

Copy link
Copy Markdown
Author

@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.

Add selection to next Find match does not work with Regex Find Mode

3 participants