AN/BDO: Remove infinite undos but make sure undos work when switching
between buffers