Main motive: when using `merge_type` = `replace`, this avoids creating
an edit entry when there are no changes.
Example. Suppose the user uses `primary+z` to revert to an earlier
state of the buffer and triggers formatting (for example, by saving).
If the current state of the buffer was already correctly formatted,
the resulting repeated formatting makes no changes, and the plugin
doesn't modify the state of the undo/redo stack. The user can then
use `shift+primary+z` to revert to a later state of the buffer.