public void ClearUndoHistory() { textBufferUndoManager.UnregisterUndoHistory(); var dummy = textBufferUndoManager.TextBufferUndoHistory; }