Skip to content

Find command does not correctly change mode of Find/Replace dialog #246405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jasonmray opened this issue Apr 12, 2025 · 2 comments
Open

Find command does not correctly change mode of Find/Replace dialog #246405

jasonmray opened this issue Apr 12, 2025 · 2 comments
Assignees

Comments

@jasonmray
Copy link

Type: Bug

Expected: When I highlight something and press Ctrl+F, the Find/Replace dialog should switch to Find mode.

Actual: When the dialog is already open in Replace mode, invoking the Find command does not switch the UI to Find mode.

Repro Steps:

  1. Open a source file and select some text. Press Ctrl+H to invoke the Replace command.
  2. Notice that the Find/Replace dialog opens in Replace mode.
  3. Without closing the Find/Replace dialog, select some text and press Ctrl+F to invoke the Find command.
  4. Notice that the Find/Replace dialog stays in Replace mode instead of switching to Find mode.

VS Code version: Code - Insiders 1.100.0-insider (043f699, 2025-04-11T05:23:04.452Z)
OS version: Windows_NT x64 10.0.19045
Modes:

@RedCMD
Copy link
Contributor

RedCMD commented Apr 12, 2025

I prefer the current implementation

why is it bad that it stays in replace mode view?
pressing enter (after ctrl+f) still results in it simply jumping to the next selection. without replacing anything

unless you press tab
then it'll start replacing text when you press enter

does pressing ctrl+H toggle replace mode off again?
could say that's a bug if it doesn't

@jasonmray
Copy link
Author

The current behavior makes the UX inconsistent for a common operation. When the user invokes a find command, they should see the find UX. It also breaks keyboard shortcuts and muscle memory. For instance it completely changes what happens if you press Ctrl+F then Tab.

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

No branches or pull requests

3 participants