Reading the comments on how vim and Emacs have implemented Undo/Redo with various options was very helpful. I personally don't use these editors, but I'm working on a graph drawing tool where the user usually modifies multiple parts of the graph. Right now we only have linear redo/undo implemented. Reading about all this other options is really helpful. Especially the Time travel and the regional undo are very smart features that are also very helpful for all graphic based editors.
Jetbrains’ IDEs have both of them and more.
The feature is called “Local History”. [1]
You can see the history of an file, a selected region of text, or even your entire project. It can undo file deletions/moves/renames.
It feels like a personal “automated git without the git hassles”.
It has got me out of some really bad situations.