cursor position lost after search


PhpStorm v2018.1.1

Win 10


If I open the Search in file toolbar ( Ctrl+f ) and search for something, and then click somewhere in the file to make an edit, as soon as I clear or close the search, my cursor and the page moves back to where it was before starting the search. I would expect the cursor to not move!

This is driving me insane and I do not recall this happening in PhpStorm 2017



How exactly do you clear the Find field, with the cross icon?
I can reproduce that this way, but it's expected - you made a wrong pass and want to go back.
It doesn't happen when you discard the search with Esc, does it?


thank you!!! i was using the 'x' icon. esc does what i wanted, and actually its great to have both options



I have the same problem in PyCharm. I am quite sure it's a bug as the behaviour does not make much sense.

Yes, it was not like that in the 2017 version (not exactly sure when they changed it; I just tried it in 2017.2.2. Everything is fine there)

The cursor position is saved on two occasions: when the file is closed, or when the search tab is closed. Whenever I clear the search input (either with del key, or the grey circle "x" icon), the cursor returns to this position; i.e. if you keep the search tab open all the time, it always returns to the position from when the file was last opened. Even if it was "intended" to behave this way, it is not really coherent or logical, plus it makes the "x" icon practically unusable and redundant.


Just in case, there were some issues like that are fixed for the upcoming 2018.1.5.



Can we have an option to disable the back to previous cursor by clearing the find field ?

I think we should have the choice for this feature because it can become very boring...

Thank you !!


Looks like this was just addressed/implemented:

Planned to be included in a next major IDE update.


Please sign in to leave a comment.