Function UndoBuffer.hasUndo

returns true if buffer contains any undo items

bool hasUndo() @property;