pdt
pdt copied to clipboard
Undo/redo sometimes causes permanent data loss
Describe the bug I was instructed on the Eclipse Platform bug tracker to open an issue here.
Sometimes when using the undo and redo functions, a portion of code goes missing, and I can't get it back. The data loss happens when doing a "redo" after having used the "undo" function. I expect the "redo" to revert the change that was undone, but instead I get either an incomplete piece of it or nothing at all.
I use the keyboard shortcuts Ctrl+Z (undo) and Ctrl+Shift+Z (redo).
I can't reproduce this intentionally. I really don't know how. It happens at least once a week while I'm working.
Describe the eclipse environment -- Configuration Details -- Product: Eclipse IDE 4.18.0.20201210-1200 (org.eclipse.epp.package.php.product)Installed Features: org.eclipse.platform 4.18.0.v20201202-1800
I'm using the PHP IDE package and nothing else.
Describe your system
- OS: Ubuntu LTS
- Version 20.04
- PHP Version 7.4
- Webserver Version Apache httpd 2.4
- Utils none
To Reproduce Steps to reproduce the behavior:
- Write a piece of code
- Press Ctrl+Z to undo some of it
- Press Ctrl+Shift+Z to redo
Expected behavior In step 1:
if (a === b) {}
In step 2:
if (a ===
In step 3:
if (a === b) {}
What happens instead In step 1:
if (a === b) {}
In step 2:
if (a ===
In step 3 (something like this):
if (a ==={}
Additional context Related Eclipse Platform bug reports:
I sometime experience this issue too.
This is because WTP use own undo/redo stack. I prepared fix last year but work was blocked: https://bugs.eclipse.org/bugs/show_bug.cgi?id=191754 I'll try refresh this in next week
I’m in process to drop WTP completely. Closing as wont fix