int getHeightOfFoldedBlockInlaysBefore(int idx) {
    if (!isFoldingEnabled()) return 0;
    CachedData cachedData = ensureAvailableData();
    if (idx == -1) return 0;
    cachedData.ensureInlayDataAvailable();
    int[] topFoldedInlaysHeight = cachedData.topFoldedInlaysHeight;
    return topFoldedInlaysHeight == null ? 0 : topFoldedInlaysHeight[idx];
  }
int getHeightOfFoldedBlockInlaysBefore(int idx)