change cursor in accordance with selection