There is not expected behavior of 'Undo' when (e.g. by chance) one make a change in folded code - at the first line of block followed by {...}. Such change is automatically applied to every folded line. This is not nice but somehow understandable (wrong step - not nice consequences

). The problem comes when to undo such accidental change before unfolding the block

. 'Undo' works then like there were no folded code, changing the following lines. More, there is no possibility to 'Redo' the 'Undo'

. Easy way to loose some text

.