# Undo and redo errors PDE IDE

**URL:** <https://discourse.processing.org/t/undo-and-redo-errors-pde-ide/16419>\
**Category:** Processing\
**Created:** [December 15, 2019, 2:36pm UTC](https://discourse.processing.org/t/undo-and-redo-errors-pde-ide/16419 "2019-12-15T14:36:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [December 15, 2019, 2:36pm UTC](https://discourse.processing.org/t/undo-and-redo-errors-pde-ide/16419/1 "2019-12-15T14:36:44Z")

</div>

Has anyone ever experienced any issues undoing multiple times? Most of the time it works fine, but then sometimes it doesn’t and it just restores garbage code.

This can be corrected by saving frequently, but still not an ideal workaround. Am i the only one experiencing this?

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [December 16, 2019, 3:46am UTC](https://discourse.processing.org/t/undo-and-redo-errors-pde-ide/16419/2 "2019-12-16T03:46:27Z")

</div>

> [@paulgoux](#):
>
> just restores garbage code

never see that, but for a error issue please provide full details:  
what processing version / OS you see that error?  
like using: [http://download.processing.org/processing-3.5.3-windows64.zip](http://download.processing.org/processing-3.5.3-windows64.zip)

what i see , but that is the correct / only way,  
that you need sometimes MORE [ctrl][z] as expected.

* * *

also it might be that there are operations, that interfere with that buffer,  
in that case we must find out what PDE menu function you used inbetween???

---

<div class="post-metadata">

**Author:** ![Tiemen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tiemen/32/5477_2.png) [@Tiemen](https://discourse.processing.org/u/Tiemen)\
**Post date:** [December 16, 2019, 1:01pm UTC](https://discourse.processing.org/t/undo-and-redo-errors-pde-ide/16419/3 "2019-12-16T13:01:05Z")

</div>

Yes, I noticed the same thing. It happens to me when I’m swapping between tabs and using undo, although I’m not completely sure what triggers it exactly.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [December 20, 2019, 5:09pm UTC](https://discourse.processing.org/t/undo-and-redo-errors-pde-ide/16419/4 "2019-12-20T17:09:20Z")

</div>

What exact version number of Processing are you seeing this with?

Yes, I have also seen this multi-undo-restores-junk error in the past several times. As a result I don’t trust the undo buffer on PDE – this means I Save As often if I’m attempting a soft fork that I want to undo out of. I agree with Tiemen that one of the triggers may be switching tabs, however I believe that I have seen it happen in a single-tab sketch before. The key thing is (or seems to be) to not undo too fast – but it is muscle memory, so I forget. Still, it is hard to replicate – I just did a quick test and was unable to replicate the error on 3.4, even while running a sketch under heavy load – holding Ctr+Z and Ctrl-Shift-Z scrubbed back and forth through a long edit history with no errors.

@paulgoux Would you please report your experience and exact Processing version number to this open issue?

> <https://github.com/processing/processing/issues/4775>
>
> Undo within the processing environment can create problems and has created issues for me. Under heavy cpu load where the screen...

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [December 20, 2019, 7:02pm UTC](https://discourse.processing.org/t/undo-and-redo-errors-pde-ide/16419/5 "2019-12-20T19:02:40Z")

</div>

I’m currently using version 3.4, and to my recollection I have had this issue, definitely on version the earlier versions. I shall wait and see if it re-occurs, if it does I shall try to detail the experience.

But now as a general rule of thumb I tend not to undo, unless I really have to, so using github is a big help.
