Undo history

Hi.
Not sure if it is a bug or if it is intended, so I categorized this as “feedback”.

I just encountered an issue while performing an operation I am almost certain I did in the past without any problem.
I was editing a document, and then realized halfway through that I should’ve taken a snapshot first.
So, having done nothing else in this document since loading the project, I just Ctrl-Z’ed all the way back.
Then took my snapshot.
But then when I came to Ctrl-Y (redo) everything to go back to the stage I was with my editing, I realized that for some reason the Undo/Redo history seemingly got wiped clean.

I’ve somewhat been careless in my actions, I admit it.
But… Bug or intended? Was the undo history supposed to reset like that?

. . . . . . . .
[EDIT] I just tried to reproduce in my test project :
Which led to me realizing that for some reason, when undo got to the bottom of the undo history, my keyboard spitted a “z” and then removed it. I think that this might be it. Because otherwise, I redid the experiment, but this time careful not to have a pointless “z” be added to, then removed from, my document (branching the undo/redo history, overwriting the original (?)), and all worked fine. (So, possibly “user error”.)