FList<TextRange> (@NotNull FList<TextRange> ranges, @NotNull Range range) { Range head = ((Range)ranges.getHead()); if (head != null && head.getStartOffset() == range.getEndOffset()) { return ranges.getTail().prepend(new Range(range.getStartOffset(), head.getEndOffset(), range.getErrorCount() + head.getErrorCount())); } return ranges.prepend(range); }