Rhyme or reason to undo/redo scrolling?

I've noticed that when I undo/redo something, the screen will scroll.  I don't really know why.  Is there a reason for this?

Some times it takes me to the area that was related to the undo/redo, but other times it brings me to a portion of the page that, seemingly, had absolutely nothing to do with the edit.

Is there there either:

1. A way to disable this scrolling when undo/redo?
2. Any information regarding this... feature?

Thanks a bunch!

Comment actions Permalink

scrolling seams to work correctly for me.

If i am in a file i change recently.
* first push of ctrl+z takes me to the change
* second push of ctrl+z reverts the change
* third push of ctrl+z takes me to the next location of the previous change
* fourth push of ctrl+z reverts the change.

If I am on line 5 in the editor and the last change was on line 2455, the first ctrl+z will take me to 2455.

Is that not how it works for you?

Comment actions Permalink

I realize that this thread is a bit dated, but I am having trouble understanding the scrolling behind undo myself.

The first undo seems to behave the way you describe.  Thereafter, I'm not sure what it is doing. It seems to perform the undo and then jump to the next location, all with one keypress.  Most editors I'm familiar with will jump to the next location, *then* perform the undo - so that you don't jump if you are already in the right location.  This may have something to do with the fact that one of the actions in my undo history is a Replace All?

Also, I've seen at least one circumstance where if I scroll after one of the jumps (for instance, put the current line at the top of the window, where it is easier to read the following context), and the next location was on the screen before my manual scroll, it will move the cursor off screen, but not scroll to it.

I'm using PHPStorm on Windows 7. Version 7.1.3.

Comment actions Permalink

version 8 was just released.  See if it fixes it for you.

Otherwise, figure out a way to reproduce the issue so others can follow along, then report it as a bug, or just make a screencast of it happening.

Its hard to understand the issue without being able to reproduce it.  I haven't noticed anything weird with ctrl+z and ctrl+shift+z.


Please sign in to leave a comment.