Recently learned of a couple reasons that you can find that your undo history has been cleared out. It involves projects that use worksets. When you do something that causes Revit to take ownership of a workset first, in order to do what you want, like deleting a view, Revit clears out its Undo "stack".
In the case of a view if you borrow the view first and then delete it the undo stack remains intact. To borrow it first you'd have to select the view's annotation symbol, right click and chose Make Workset Editable. You can do the same thing in the project browser over the view name, choose Make Workset Editable too. You could also alter a parameter and reset it or use the Workset dialog to make it editable.
Same thing happens if you delete a family from the project browser without borrowing it first. To do that you can click Make Workset Editable via Right Click on the family in the project browser too. A component family will Make Workset Editable while a family's type will offer Make Element Editable. The workset it refers to is the family workset found in the Workset dialog when you select the Families "Show" filter.
It isn't really intended to happen that way. Optimistically we could see a fix in a future update but more likely not till another release.