Skip to content

fix: Fix findWithArgs ignoring empty search strings (#151311) - #334803

Open
wynn (wynnsimon) wants to merge 1 commit into
microsoft:mainfrom
wynnsimon:wynnsimon/fix-find-with-args-empty-search
Open

fix: Fix findWithArgs ignoring empty search strings (#151311)#334803
wynn (wynnsimon) wants to merge 1 commit into
microsoft:mainfrom
wynnsimon:wynnsimon/fix-find-with-args-empty-search

Conversation

@wynnsimon

Copy link
Copy Markdown

Fixes #151311

Prevent selection and global find clipboard contents from overriding an explicitly provided searchString, including an empty string. Preserve automatic seeding when searchString is omitted.

Adds regression tests for repeated calls with omitted, empty, and non-empty search strings.

To verify:

  1. Select text in the editor.
  2. Repeatedly invoke editor.actions.findWithArgs with { "isRegex": true, "searchString": "" }.
  3. Confirm the search field stays empty instead of alternating between empty and selected text.

Copilot AI balanced review requested due to automatic review settings September 6, 2026 12:51

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 was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

editor.actions.findWithArgs behaves inconsistently when searchString is empty

3 participants