# Undo Ctrl+Z not working in .bnd files?

**URL:** <https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91>\
**Category:** GENERAL\
**Created:** [February 2, 2021, 9:13pm UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91 "2021-02-02T21:13:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Post date:** [February 2, 2021, 9:13pm UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91/1 "2021-02-02T21:13:59Z")

</div>

Is it just me or is Undo (Ctrl+Z (or Ctrl-Y depending on keyboard) and also menu) not working in .bnd files source view?

In the menu it is greyed out.

 ![image](https://global.discourse-cdn.com/free1/uploads/bnd/original/1X/4debe4d5b7edc6c7bdb7f275c57fdc5b822a31ec.jpeg)

**Environment**

- MacOS 10.15.7
- Eclipse 2020-12
- Bndtools 5.2.0.REL-202010142003-gc979114 bndtools.main.feature.feature.group Bndtools
- checked in Bndtools Explorer and also Java-Perspective

---

<div class="post-metadata">

**Author:** ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Post date:** [February 2, 2021, 9:22pm UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91/2 "2021-02-02T21:22:01Z")

</div>

Seems Eclipse restart fixed it. Just really noticed it when it was not working.  
Maybe it got lost somewhere while having it open. I will keep an eye on it when it happens again.

---

<div class="post-metadata">

**Author:** ![bjhargrave](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/bjhargrave/32/10_2.png) [@bjhargrave](https://bnd.discourse.group/u/bjhargrave)\
**Post date:** [February 2, 2021, 9:25pm UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91/3 "2021-02-02T21:25:34Z")

</div>

See [https://github.com/bndtools/bnd/issues/4433](https://github.com/bndtools/bnd/issues/4433). We sometimes see this but do not have a handle on the real problem. 🙁

---

<div class="post-metadata">

**Author:** ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Post date:** [February 2, 2021, 9:26pm UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91/4 "2021-02-02T21:26:38Z")

</div>

Thanks, should have checked github in the first place.

---

<div class="post-metadata">

**Author:** ![kriegfrj](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/kriegfrj/32/24_2.png) [@kriegfrj](https://bnd.discourse.group/u/kriegfrj)\
**Post date:** [February 2, 2021, 11:47pm UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91/5 "2021-02-02T23:47:55Z")

</div>

The GitHub issue for this gives a detailed account on how to reproduce the problem. Basically, the last-opened bnd or bndrun editor steals the “undo focus” and doesn’t let it go no matter which editor has the edit focus.

---

<div class="post-metadata">

**Author:** ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Post date:** [February 2, 2021, 11:59pm UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91/6 "2021-02-02T23:59:54Z")

</div>

Not sure if it is helpful, but I found this pretty old Eclipse bug [162964 – [Undo] - Resource undo only works when Navigator is active](https://bugs.eclipse.org/bugs/show_bug.cgi?id=162964#c30) which also seems to be related to Undo. Maybe some pointers for the ones who are deeper in the Eclipse code.

---

<div class="post-metadata">

**Author:** ![kriegfrj](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/kriegfrj/32/24_2.png) [@kriegfrj](https://bnd.discourse.group/u/kriegfrj)\
**Post date:** [October 22, 2021, 1:23am UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91/7 "2021-10-22T01:23:16Z")

</div>

An update: thanks to a tip from [Gabriël Konat](https://github.com/Gohla), this issue has now been fixed in the master branch and is available to users of the snapshot version of Bndtools from now. For those who aren’t keen on using the bleeding edge, it should be available in the next release of Bndtools (which at this stage looks like it will be a 6.1, fairly soon).

---

<div class="post-metadata">

**Author:** ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Post date:** [October 22, 2021, 9:05am UTC](https://bnd.discourse.group/t/undo-ctrl-z-not-working-in-bnd-files/91/8 "2021-10-22T09:05:05Z")

</div>

Great, thanks for the info.
