multiselect: merge overlapping ranges