Only save undos on path changes.