cursor position lost after search

Answered

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

Help?

4 comments

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?

0

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

cheers

0

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.

0

Just in case, there were some issues like https://youtrack.jetbrains.com/issue/IDEA-191839 that are fixed for the upcoming 2018.1.5.

0

Please sign in to leave a comment.