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