Remove view code from cd().
Guarantee selection visibility.