Let me just to point out. I'm afraid this is a real bug (v3.96b), not the register or installation problem.
There is not expected behavior of 'Undo' when (e.g. by chance) one make a change in folded code (at the first visible line). The change is automatically applied to every folded line. This is not nice but somehow understandable (wrong step - not nice consequences). The problem arises when to undo such accidental change before you unfold the block. 'Undo' works like there were no folded code changing the following lines. More, there is no possibility to 'Redo' the 'Undo'.