record selection history, correctly handle config changes