void (SimpleColoredComponent component, @NotNull List<Integer> offsets) { SimpleColoredComponent.ColoredIterator iterator = component.iterator(); iterator.next(); for (int offset : offsets) { while (iterator.hasNext() && offset >= iterator.getEndOffset()) { iterator.next(); } if (offset > iterator.getOffset() && offset < iterator.getEndOffset()) { iterator.split(offset - iterator.getOffset(), iterator.getTextAttributes()); } } }