pdt icon indicating copy to clipboard operation
pdt copied to clipboard

Undo/redo sometimes causes permanent data loss

Open o-alquimista opened this issue 4 years ago • 2 comments

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:

  1. Write a piece of code
  2. Press Ctrl+Z to undo some of it
  3. 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:

o-alquimista avatar Feb 25 '21 16:02 o-alquimista

I sometime experience this issue too.

pounard avatar Feb 26 '21 20:02 pounard

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

zulus avatar Apr 08 '21 16:04 zulus

I’m in process to drop WTP completely. Closing as wont fix

zulus avatar May 22 '23 11:05 zulus