Important fix: PsiFile.getParent() is PsiDirectory!
This commit is contained in:
@@ -460,7 +460,7 @@ public fun PsiFile.elementsInRange(range: TextRange): List<PsiElement> {
|
|||||||
.parents(withItself = true)
|
.parents(withItself = true)
|
||||||
.first {
|
.first {
|
||||||
val parent = it.getParent()
|
val parent = it.getParent()
|
||||||
parent == null || parent.getTextRange() !in currentRange
|
it is PsiFile || parent.getTextRange() !in currentRange
|
||||||
}
|
}
|
||||||
result.add(element)
|
result.add(element)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user