visual-studio-2015finddialog

Visual Studio 2015 Find dialog loses selection and no longer defaults to search Selection


In Visual Studio 2015, when I select some text and press Ctrl+F or Ctrl+H, it doesn't default to search within the Selection. This is a huge breaking change to my workflow.

Additionally, it seems like sometimes it even removes my selection, though I haven't confirmed this for sure (I use the dark theme and sometimes it's hard to tell what's selected).

Is there any way to get the old behavior back, where if I launch the find dialog with a selection in the active window, it defaults to search within "Selection" instead of "Current Document"?

For those who want to get in on the action, I've reported this as a bug at Microsoft Connect.


Solution

  • I had no idea this was a setting! The solution is as simple as checking a box—Go to Tools -> Options -> Environment -> Find and Replace and check "Automatically limit search to selection".

    Visual Studio 2015 option to limit search to selection.

    Microsoft has acknowledged this change in behavior from the previous version—I received an email that Visual Studio 2015 Update 2 will have this option set by default for fresh installations.

    Thank you, Microsoft!