private static boolean selectionMayContainRange(SelectionModel selection, TextRange range) {
    int[] starts = selection.getBlockSelectionStarts();
    int[] ends = selection.getBlockSelectionEnds();
    return starts.length != 0 && new TextRange(starts[0], ends[starts.length - 1]).contains(range);
  }
private static boolean selectionMayContainRange(SelectionModel selection, TextRange range)