Skip to content

Commit dac6f1c

Browse files
committed
enable plugin in all products
1 parent 48f0eb4 commit dac6f1c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/tang/intellij/lua/editor/surroundWith/LuaSurroundDescriptor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private static PsiElement[] findStatementsInRange(@NotNull PsiFile file, int sta
6868
}
6969
break;
7070
}
71-
if (parent instanceof PsiCodeBlock) break;
71+
//if (parent instanceof PsiCodeBlock) break;
7272
if (parent instanceof PsiCodeFragment) break;
7373
if (parent == null || parent instanceof PsiFile)
7474
return PsiElement.EMPTY_ARRAY;
@@ -91,10 +91,10 @@ private static PsiElement[] findStatementsInRange(@NotNull PsiFile file, int sta
9191
//if (endOffset != element2.getTextRange().getEndOffset())
9292
// return PsiElement.EMPTY_ARRAY;
9393

94-
if (parent instanceof PsiCodeBlock && parent.getParent() instanceof PsiBlockStatement &&
95-
element1 == ((PsiCodeBlock)parent).getLBrace() && element2 == ((PsiCodeBlock)parent).getRBrace()) {
94+
/*if (parent instanceof PsiCodeBlock && parent.getParent() instanceof PsiBlockStatement &&
95+
element1 == ((PsiCodeBlock) parent).getLBrace() && element2 == ((PsiCodeBlock) parent).getRBrace()) {
9696
return new PsiElement[]{parent.getParent()};
97-
}
97+
}*/
9898

9999
PsiElement[] children = parent.getChildren();
100100
ArrayList<PsiElement> array = new ArrayList<>();

0 commit comments

Comments
 (0)