diff --git a/editor/intellij/src/main/java/org/intellij/sdk/language/YakshaFolderBuilder.java b/editor/intellij/src/main/java/org/intellij/sdk/language/YakshaFolderBuilder.java index 6710689..1d6c400 100644 --- a/editor/intellij/src/main/java/org/intellij/sdk/language/YakshaFolderBuilder.java +++ b/editor/intellij/src/main/java/org/intellij/sdk/language/YakshaFolderBuilder.java @@ -21,6 +21,7 @@ public class YakshaFolderBuilder extends FoldingBuilderEx implements DumbAware { return SyntaxTraverser.psiTraverser(root) .filter(i -> (i instanceof YakshaClassBlock || i instanceof YakshaDefBlock || i instanceof YakshaEnumBlock || i instanceof YakshaDslOuterBlock)) .map(i -> new YakshaFoldingDesc(i, getRange(i))) + .filter(x -> x.getRange().getLength() > 0) .toList().toArray(new FoldingDescriptor[0]); }