Undo ^Z behavior changed -- or a bug?

^Z (Undo) behavior:

Before:

If the cursor is *not* where the last operation was done (eg user moved the caret after), then the caret is moved there, first. No actual Undo is performed.

Since 2017.1:

Sometimes, even if the cursor is away from the last change, ^Z goes there and performs the Undo ⇒ Dangerous.

 

"Annoying, isn't it"

 

10 comments
Comment actions Permalink

Hello,

I cannot reproduce this in 2017.2. What is your exact PhpStorm version?

0
Comment actions Permalink

Using 2017.2 (PhpStorm-172.3317.83).

 

It doesn't happen always, you need to work on the code and move above (this is what I did).

 

0
Comment actions Permalink

Unfortunately, we need certain steps to reproduce, at the moment there's no similar reports, and we also can't reproduce that on our own.
Maybe, you'll be able to find a way.

0
Comment actions Permalink

Sorry Eugene, but that behavior happens several times per day - even on 2017.2.4 (on Ubuntu 16.04 fully patched) - in PHP files at least.

It happens maybe only on Ubuntu (would be strange but anyways).

0
Comment actions Permalink

Did you try disabling all custom plugins and checking how it will go without them?

Could it be something about the keyboard (like sticky Z key that goes twice instead of once)?

0
Comment actions Permalink

Before using PhpStorm 2017 for the first time, I completely removed any settings and customization (basically, deleted all ~/.PhpStorm* and projects/.idea dirs) to get a clean and clear configuration (having the defaults resulted in a faster setup). Then I did a big of customization, but not much - and anyway only through the settings, like key shortcuts and the like, and didn't touch the plugins config.

Well, it happens so often (while editing, going to another application - eg emacs - then back to PS, doing a few PgUp/Dn, then ^Z sometimes has this annoying behavior), that if that never happens to you there is probably something wrong with my setup, this is the only conclusion I might come to at this time!

I may have ticked the wrong checkbox somewhere. 

0
Comment actions Permalink

> I may have ticked the wrong checkbox somewhere. 

Nope, it seems that you were right - probably, you have to actually code to face this bug, as recently our colleague submitted this bug with some reproduction steps.
Please follow here: https://youtrack.jetbrains.com/issue/IDEA-180365

0
Comment actions Permalink

Thanks Eugene.

Found a way to repeat the problem, I think.
Please see the 'bug' comments.

0
Comment actions Permalink

By the way, shouldn't that kind of fix of a dangerous bug (and, could be wrong but, "simple fix", I assume) be candidate for a 2017.2.5 version?

It seems to be fixed in 2018.1, but - could be wrong again - 2018 sounds like we have to wait for another 2 months, at least?

0
Comment actions Permalink

Unfortunately, I have no control over that. Please leave this comment to the issue thread, I think they should backport this fix to 2017.2.

0

Please sign in to leave a comment.