@Override
  public void beforeFoldRegionDisposed(@NotNull FoldRegion region) {
    if (!myDuringDocumentUpdate || myDocument.isInBulkUpdate() || !(region instanceof CustomFoldRegion)) return;
    myDocumentChangeStartOffset = Math.min(myDocumentChangeStartOffset, region.getStartOffset());
    myDocumentChangeEndOffset = Math.max(myDocumentChangeEndOffset, region.getEndOffset());
  }
@Override
  public void beforeFoldRegionDisposed(@NotNull FoldRegion region)