Starting a new "Find" without defaulting to previous search text

I have a question about the apparent default behavior of repeating a previous Find.

Suppose I have a file open, and I want to find an occurrence of the text "foo" in the file. I hit Command-F (Mac), type "foo" into the search bar that appears at the top of the editor area, and the editor region jumps to the first spot in the file that matches this text. I hit `Esc` to get out of the search bar, and I do some editing at the spot where I was taken.

A little later, I want to search for "bar". Once again I hit Command-F. But before I can start my new search, PhpStorm assumes I want to continue my previous search: "foo" is still in the search bar that appears, and before I can type anything, it has scrolled the file to an occurrence of "foo" that it finds. I can still type "bar" and proceed with the search that I actually want, but that initial behavior is disruptive: PhpStorm may scroll me to a different part of the file and highlight "foo", which I'm no longer interested in.

Sometimes this behavior is useful, but a lot of the time it isn't -- and anyway, isn't that what F3 (Find Next) is for? Is there a way to tell PhpStorm to start a fresh find, with the search box empty again and without immediately scrolling me away from my current position in the file?

0
1 comment

Here's a link to corresponding discussion: https://youtrack.jetbrains.com/issue/IDEA-170654

Feel free to participate - you'll be heard by developers.

1

Please sign in to leave a comment.