deleting only selection if selection is not empty