@NotNull
  @Override
  public List<? extends SoftWrap> getSoftWrapsForRange(int start, int end) {
    if (!isSoftWrappingEnabled() || end < start) {
      return Collections.emptyList();
    }

    List<? extends SoftWrap> softWraps = myStorage.getSoftWraps();

    int startIndex = myStorage.getSoftWrapIndex(start);
    if (startIndex < 0) {
      startIndex = -startIndex - 1;
      if (startIndex >= softWraps.size() || softWraps.get(startIndex).getStart() > end) {
        return Collections.emptyList();
      }
    }

    int endIndex = myStorage.getSoftWrapIndex(end);
    if (endIndex >= 0) {
      return softWraps.subList(startIndex, endIndex + 1);
    } else {
      endIndex = -endIndex - 1;
      return softWraps.subList(startIndex, endIndex);
    }
  }
 @Override
 public int getSoftWrapIndex(int offset) {
   if (myEditor.myUseNewRendering && !isSoftWrappingEnabled()) {
     return -1;
   }
   return myStorage.getSoftWrapIndex(offset);
 }
 @Override
 public int getSoftWrapIndex(int offset) {
   return myStorage.getSoftWrapIndex(offset);
 }