According to MSDN, the description of the method ClearUndo is:
"Clears information about the most recent operation from the undo buffer of the text box."
Now, contrary to what the documentation says, the override of this method in System.Windows.Forms.RichTextBox appears to be clearing the entire undo buffer, instead of just the most recent operation. Is this discrepancy between the documentation and the implementation a known issue, or should I suspect that something else it amiss? I have been unable to find any official information on this which is why I am now asking the question here. I have tested it with .NET Framework 4.0.
You are correct. ILSpy shows this in
TextBoxBase(theRichTextBoxdoesn’t override it):The message 205 is
EM_EMPTYUNDOBUFFER: