Skip to content

Commit

Permalink
fix(yakshaintellij): do not fold empty regions
Browse files Browse the repository at this point in the history
  • Loading branch information
JaDogg committed Dec 26, 2024
1 parent 620dc2d commit c12e84f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down

0 comments on commit c12e84f

Please sign in to comment.