Right, if it's about undo history, screw that, at some point you don't care anymore -- you might build a sort of VCS into the text editor so you can keep track of changes in a less granular way. If it's about knowing when you have all the history before some point in time, then that's doable.
And thanks for the link!