Double-clicking Find result doesn't center horizontally

If I right-click a folder in the Project sidebar and select "Find in Path", then double-click one of the search results, it centers the view (relatively) vertically to the where the cursor is on the line in the code, but not horizontally if the result is near the end of the view or outside of the view. I prefer not to use word-wrap since it's usually easier to read, but then it's hard to spot the cursor if the result is near the end of the view or outside of it.

Is this a bug or a setting? I think if it's going to center vertically (which it should do better), it should also center horizontally (at least relatively) as well.

13 comments
Comment actions Permalink

Hello,

Not sure if I can reproduce this.

Could you record a screencast with the steps to reproduce the issue and provide a link to it, please?

0
Comment actions Permalink

I can but it would probably be quicker and easier for you to see if you simply disable word-wrap, open up some HTML/PHP code that does not wrap with hard breaks (try auto-formatting), then search for a term that extends off the side of the view (you can reduce the size of the editor window to make more characters go off the right of the viewport).

0
Comment actions Permalink

The problem is I'm working with proprietary company code that I can't record on video and would be difficult to demonstrate in screenshots; it would be much easier to simply follow my steps, if you understand the product enough. If not, I can tell you exactly what to click, but I was hoping someone would know how to config the app at least as well as I do.

0
Comment actions Permalink

Thanks.

I tried to do this but when I double-click the result in Find Occurrences tool window, it places the caret right in front of the found occurrence and both vertical and horizontal scrollbars are centered.

Could you, please, download and install the latest Early Access Program build from https://confluence.jetbrains.com/display/PhpStorm/PhpStorm+Early+Access+Program and check if the described issue is still present there?

0
Comment actions Permalink

Thanks for the detail; you're using the Early Access build? I'm using v10. Was this fixed in 2016.1? I'm reticent to upgrade again so soon (seems every three months now) as we had problems last time and had to reconfig a lot of things and the time spent doesn't look good to our manager.

I can try Early Access build on my laptop when I get home.

0
Comment actions Permalink

If the term is off to the right of the viewport, the cursor will only move the code horizontally enough to show the cursor and part of the first character, which is even harder to find; also it being only a cursor and not a full highlight makes it harder to spot.

0
Comment actions Permalink

Thanks for the screenshot, now it's understood. Unfortunately there is no such option to manage this behavior at the moment.

It would be great if you could submit the request for centering the text to our tracking system here: <http://youtrack.jetbrains.com/issues/IDEA#newissue=yes>. You will be able to receive the answer directly from our developers while other users will be able to write their opinion of your proposal.

0
Comment actions Permalink

Well, an option isn't necessary, just to have it center the same kind of way vertical does automatically, it's only sensible.

I'll submit the issue, thanks.

0
Comment actions Permalink

Could someone please provide a link to the issue? I can't seem to find it in the tracker and after using IntelliJ for a few weeks, this bug is becoming a nuisance when navigating new code and trying to find where things are. Thanks.

0
Comment actions Permalink

It seems that Dave did not submit it (at least, I could not find the issue among reported by him). Could you please submit it?

0
Comment actions Permalink

Sorry I think I didn't have time to submit the issue adequately, but it's still happening.

The problem with submitting is I can't submit proprietary company code so I'm not sure how to edit screenshots the best, or if it requires a video (and I don't know how I'd obscure code in video), and I don't know how long it would take to write example code (though a PHPStorm developer can probably make a better test example than I could anyways).

I think the issue is described clearly, could a PHPStorm developer try the search in any of their own existing code where the search term is found in lines that extend beyond the screen with word-wrap off? This really shouldn't be difficult to reproduce, however I'm still on version 10 and haven't upgraded as the last two upgrades caused some business problems and time spent issues with our developers due to the cumbersome and apparently buggy way JetBrains requires us to upgrade.

0

Please sign in to leave a comment.