@Nullable
  private FindResult firstOccurrenceAfterOffset(int offset) {
    FindResult afterCaret = null;
    for (FindResult occurrence : getOccurrences()) {
      if (offset <= occurrence.getStartOffset() && (afterCaret == null || occurrence.getStartOffset() < afterCaret.getStartOffset())) {
        afterCaret = occurrence;
      }
    }
    return afterCaret;
  }
@Nullable
  private FindResult firstOccurrenceAfterOffset(int offset)