When a command is called with a collapsed selection, the transaction is run (thus the history is pushed), yet the content has not changed, as the command is not applied to any existing content. For example, clicking bold without a selection — the command only applies once the user starts typing.