class Reline::LineEditor

def range_subtract(base_ranges, subtract_ranges)

def range_subtract(base_ranges, subtract_ranges)
s = base_ranges.flat_map(&:to_a).uniq.sort - subtract_ranges.flat_map(&:to_a)
 = indices.chunk_while { |a, b| a + 1 == b }
.map { |a| a.first...a.last + 1 }