skip writing undo, if the buffer wasn't actually written