5) is common across several other editors and you could argue about correct semantics, but yes 6) is obviously a bug.
That option is much better than getting the undo/redo vs unsaved changes tracking wrong and allowing unsaved changes to be easily lost, like notepad does. :-P