Version of Notepad I use does not have multilevel undo (although it seems to wait a bit before committing the text to the buffer, so if you type a few characters it undoes them all). Redo is same key as Undo (Ctrl-Z). I'm using Win10. Maybe they changed it for Win11?
Notepad is just a bog-standard Windows edit box with a few menu options thrown in. It used to limit the file size to 64K! That probably changed when Windows became based on NT (NT3, NT4, WinXP and all later versions IIRC) rather than DOS (like Win3.1, Win95/98, probably the crap one after that as well).
WordPad does have multilevel undo IIRC. They are retiring WordPad soon I think and it won't be in new releases of Windows.
EDIT: Looks like my version of notepad anyway is just a basic (multiline) Edit control, RichEdit2.0 added multilevel undo
Remarks
Edit controls and Rich Edit 1.0:
An undo operation can also be undone. For example, you can restore deleted text with the first EM_UNDO message, and remove the text again with a second EM_UNDO message as long as there is no intervening edit operation. << That's how my version of Notepad works.
Rich Edit 2.0 and later: The undo feature is multilevel so sending two EM_UNDO messages will undo the last two operations in the undo queue. To redo an operation, send the EM_REDO message.
Rich Edit: Supported in Microsoft Rich Edit 1.0 and later. For information about the compatibility of rich edit versions with the various system versions, see About Rich Edit Controls.
https://learn.microsoft.com/en-us/windo ... ls/em-undo
EM_REDO is only for RichEdit controls which I believe my version of Notepad does not use (not gonna use WinSpy though to find out if it is just a basic Edit control).
Bit off topic though