Problems with Undo and Redo?


I’m running Tropy 1.2.0 on Windows 10, and I’m wondering if the undo and redo features need to be fixed or if I’m missing something.

Here are a few notes relating to undo and redo in the notepad.

  1. Under the Edit drop-down menu, the keyboard shortcut for Undo is listed as Ctrl+Z. Good. But Redo is listed as Ctrl+Y, which doesn’t work for me. For me, Redo is Ctrl+Shift+Z.

  2. When I’m working in the notepad, Ctrl+Z and Ctrl+Shift+Z work even when Edit>Undo and Edit>Redo are greyed out.

  3. After I’ve typed some things in the notepad, Ctrl+Z deletes a little bit of text. Good. But when I then right-click within the notepad to select Redo, Redo is greyed out. If I press Ctrl+Shift+Z, the text comes back.

  4. If I right-click in the notepad and select Undo, I lose the last 20–45 minutes of my work! And—I’m not so sure about this one because I don’t want to run the risk of trying it again—I think that if I click Undo through this right-click menu more than once, Redo works only one time.

There are two different history stacks at play here. Undo/redo works inside of text fields (such as the note pad), but it also works on bigger action in Tropy (such as creating, deleting, merging items, and so on).

For example, let’s say you create a note, then work inside the note for 25 minutes. The note will be saved continuously while you’re working on it; if you don’t do anything else in Tropy in that time (e.g. create or edit other objects) all these saves will be combined together in Tropy’s undo history. Therefore, if you leave the note editor after 25 minutes, then undo, it will undo all the recent changes (redo will bring them back). Granular undo/redo inside the note, only works while you’re actually editing it.

I should add that the granular undo/redo in text fields only works while those fields are active (i.e., when you trigger them with the keyboard). Most of the time when you call undo/redo via the menu the text field will lose focus and you will therefore trigger Tropy’s undo/redo which operates at a much higher level.

(Regarding the Ctrl+Y vs Ctrl+Shift+Z issue, if this happens in the Notepad specifically, I’m assuming that we have conflicting bindings defined on Windows, we’ll look to fix that!)