Unpredictable jumps after search

Hello

Since some releases of PHPStorm I experience a weird jump behaviour after deleting a search text.

How you can reproduce it:

  1. Enter something you are searching for in PHPStorm, f.e.: "function" -> first occurence with "function" is found
  2. Delete the text "function" in the searchbox by pressing the "x" button right in that box

-> PHPStorm now jumps to some unpredictable position in the document instead of staying where it currently is. This is so annoying I wanted to report it. I don't know why this behaviour was implemented and how I can disable it.

Regards

6 comments

Pretty similar to both but worse:

Concrete example:

1. Cursor stays at line 100 of a document with like 500 lines of a Javascript file

2. I enter "aaa" on line 100, cursor still there

3. I enter "div" in the search field (by clicking on it or by CTRL+F)  and click the arrow-down a few times to iterate some lines with the word "div"

4. I enter "bbb" on a line where "div" is found

5. I delete "div" in the search field by clicking the "X"

The cursor jumps now to line 46. There is something I have entered/changed for like 1 month ago (while I have done many other changes in between at other positions). I have no idea why PHPStorm jumps to that line and f.e. not to line 100 (see 2.) or the last entered line (see 4.)

Expected behaviour:

After clearing the search field the cursors stays at the last found "div".

Version of PHP Storm:

PhpStorm 2018.1.5
Build #PS-181.5281.19, built on June 7, 2018
Licensed to Farai Aschwanden
Subscription is active until December 7, 2018
JRE: 1.8.0_152-release-1136-b39 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5

This problem exists for like half a year and happened from one version to the next (I can't remember when that was but before it worked as described in expected behaviour).

Regards

 

0

It looks like https://youtrack.jetbrains.com/issue/IDEA-190270 for me.

@Tayger Does Navigate | Back work fine in that case (like return you back to line 100)?

0

Navigate/Back: It depends:

If the search field is still filled ('div') then Navigate/back brings me back to the previous change, line 100 in this case.

If I empty the search box (step 5 based on explanation)) it jumps to any unpredictable line (as already described). If I then go to Navigate back it brings me back to line 100 to the line where 'div' was found and where I have done some changes (step 4 based on previous explanation).

Regards

0

Updated to the latest PHPStorm (2018.1.6), problem still exits :(

0

Latest is 2018.2.1 -  please try that build.

 

> PHPStorm now jumps to some unpredictable position in the document 

It should jump back to where the caret was when the search invoked.

0

Please sign in to leave a comment.