Buffer.canUndo

bool canUndo()

Determines whether a source buffer can undo the last action.

Returns

true if it's possible to undo the last action.