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"
Please sign in to leave a comment.
Hello,
I cannot reproduce this in 2017.2. What is your exact PhpStorm version?
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).
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.
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).
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)?
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.
> 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
Thanks Eugene.
Found a way to repeat the problem, I think.
Please see the 'bug' comments.
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?
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.
Is there a way to make the "incorrect" behaviour described above the default? It's extremely frustrating that sometimes "undo" actually undoes a change, and sometimes it doesn't. It's also different behaviour from pretty much every other program out there.